var SE=Object.defineProperty;var Mg=t=>{throw TypeError(t)};var bE=(t,e,n)=>e in t?SE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Me=(t,e,n)=>bE(t,typeof e!="symbol"?e+"":e,n),od=(t,e,n)=>e.has(t)||Mg("Cannot "+n);var N=(t,e,n)=>(od(t,e,"read from private field"),n?n.call(t):e.get(t)),me=(t,e,n)=>e.has(t)?Mg("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),te=(t,e,n,s)=>(od(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n),Ae=(t,e,n)=>(od(t,e,"access private method"),n);var gl=(t,e,n,s)=>({set _(o){te(t,e,o,n)},get _(){return N(t,e,s)}});function EE(t,e){for(var n=0;ns[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function Ff(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ad={exports:{}},go={},ld={exports:{}},Re={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Ig;function TE(){if(Ig)return Re;Ig=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.iterator;function w(L){return L===null||typeof L!="object"?null:(L=y&&L[y]||L["@@iterator"],typeof L=="function"?L:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,b={};function x(L,$,de){this.props=L,this.context=$,this.refs=b,this.updater=de||E}x.prototype.isReactComponent={},x.prototype.setState=function(L,$){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,$,"setState")},x.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function S(){}S.prototype=x.prototype;function P(L,$,de){this.props=L,this.context=$,this.refs=b,this.updater=de||E}var k=P.prototype=new S;k.constructor=P,R(k,x.prototype),k.isPureReactComponent=!0;var A=Array.isArray,F=Object.prototype.hasOwnProperty,V={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function B(L,$,de){var ge,pe={},X=null,be=null;if($!=null)for(ge in $.ref!==void 0&&(be=$.ref),$.key!==void 0&&(X=""+$.key),$)F.call($,ge)&&!q.hasOwnProperty(ge)&&(pe[ge]=$[ge]);var Pe=arguments.length-2;if(Pe===1)pe.children=de;else if(1>>1,$=Q[L];if(0>>1;Lo(pe,z))X<$&&0>o(be,pe)?(Q[L]=be,Q[X]=z,L=X):(Q[L]=pe,Q[ge]=z,L=ge);else if(X<$&&0>o(be,z))Q[L]=be,Q[X]=z,L=X;else break e}}return se}function o(Q,se){var z=Q.sortIndex-se.sortIndex;return z!==0?z:Q.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var u=Date,d=u.now();t.unstable_now=function(){return u.now()-d}}var f=[],p=[],g=1,y=null,w=3,E=!1,R=!1,b=!1,x=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(Q){for(var se=n(p);se!==null;){if(se.callback===null)s(p);else if(se.startTime<=Q)s(p),se.sortIndex=se.expirationTime,e(f,se);else break;se=n(p)}}function A(Q){if(b=!1,k(Q),!R)if(n(f)!==null)R=!0,Te(F);else{var se=n(p);se!==null&&ce(A,se.startTime-Q)}}function F(Q,se){R=!1,b&&(b=!1,S(B),B=-1),E=!0;var z=w;try{for(k(se),y=n(f);y!==null&&(!(y.expirationTime>se)||Q&&!ve());){var L=y.callback;if(typeof L=="function"){y.callback=null,w=y.priorityLevel;var $=L(y.expirationTime<=se);se=t.unstable_now(),typeof $=="function"?y.callback=$:y===n(f)&&s(f),k(se)}else s(f);y=n(f)}if(y!==null)var de=!0;else{var ge=n(p);ge!==null&&ce(A,ge.startTime-se),de=!1}return de}finally{y=null,w=z,E=!1}}var V=!1,q=null,B=-1,Y=5,ne=-1;function ve(){return!(t.unstable_now()-neQ||125L?(Q.sortIndex=z,e(p,Q),n(f)===null&&Q===n(p)&&(b?(S(B),B=-1):b=!0,ce(A,z-L))):(Q.sortIndex=$,e(f,Q),R||E||(R=!0,Te(F))),Q},t.unstable_shouldYield=ve,t.unstable_wrapCallback=function(Q){var se=w;return function(){var z=w;w=se;try{return Q.apply(this,arguments)}finally{w=z}}}})(dd)),dd}var Vg;function RE(){return Vg||(Vg=1,cd.exports=kE()),cd.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var zg;function PE(){if(zg)return It;zg=1;var t=Bf(),e=RE();function n(r){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+r,a=1;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,p=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,g={},y={};function w(r){return f.call(y,r)?!0:f.call(g,r)?!1:p.test(r)?y[r]=!0:(g[r]=!0,!1)}function E(r,i,a,c){if(a!==null&&a.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return c?!1:a!==null?!a.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function R(r,i,a,c){if(i===null||typeof i>"u"||E(r,i,a,c))return!0;if(c)return!1;if(a!==null)switch(a.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function b(r,i,a,c,h,m,v){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=c,this.attributeNamespace=h,this.mustUseProperty=a,this.propertyName=r,this.type=i,this.sanitizeURL=m,this.removeEmptyString=v}var x={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){x[r]=new b(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var i=r[0];x[i]=new b(i,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){x[r]=new b(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){x[r]=new b(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){x[r]=new b(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){x[r]=new b(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){x[r]=new b(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){x[r]=new b(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){x[r]=new b(r,5,!1,r.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function P(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var i=r.replace(S,P);x[i]=new b(i,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var i=r.replace(S,P);x[i]=new b(i,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var i=r.replace(S,P);x[i]=new b(i,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){x[r]=new b(r,1,!1,r.toLowerCase(),null,!1,!1)}),x.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){x[r]=new b(r,1,!1,r.toLowerCase(),null,!0,!0)});function k(r,i,a,c){var h=x.hasOwnProperty(i)?x[i]:null;(h!==null?h.type!==0:c||!(2C||h[v]!==m[C]){var O=` `+h[v].replace(" at new "," at ");return r.displayName&&O.includes("")&&(O=O.replace("",r.displayName)),O}while(1<=v&&0<=C);break}}}finally{de=!1,Error.prepareStackTrace=a}return(r=r?r.displayName||r.name:"")?$(r):""}function pe(r){switch(r.tag){case 5:return $(r.type);case 16:return $("Lazy");case 13:return $("Suspense");case 19:return $("SuspenseList");case 0:case 2:case 15:return r=ge(r.type,!1),r;case 11:return r=ge(r.type.render,!1),r;case 1:return r=ge(r.type,!0),r;default:return""}}function X(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case q:return"Fragment";case V:return"Portal";case Y:return"Profiler";case B:return"StrictMode";case Se:return"Suspense";case Z:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case ve:return(r.displayName||"Context")+".Consumer";case ne:return(r._context.displayName||"Context")+".Provider";case Ce:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case _e:return i=r.displayName||null,i!==null?i:X(r.type)||"Memo";case Te:i=r._payload,r=r._init;try{return X(r(i))}catch{}}return null}function be(r){var i=r.type;switch(r.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=i.render,r=r.displayName||r.name||"",i.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return X(i);case 8:return i===B?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function Pe(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function xe(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function it(r){var i=xe(r)?"checked":"value",a=Object.getOwnPropertyDescriptor(r.constructor.prototype,i),c=""+r[i];if(!r.hasOwnProperty(i)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var h=a.get,m=a.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return h.call(this)},set:function(v){c=""+v,m.call(this,v)}}),Object.defineProperty(r,i,{enumerable:a.enumerable}),{getValue:function(){return c},setValue:function(v){c=""+v},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function Qt(r){r._valueTracker||(r._valueTracker=it(r))}function ct(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var a=i.getValue(),c="";return r&&(c=xe(r)?r.checked?"true":"false":r.value),r=c,r!==a?(i.setValue(r),!0):!1}function un(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function Gt(r,i){var a=i.checked;return z({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??r._wrapperState.initialChecked})}function Xt(r,i){var a=i.defaultValue==null?"":i.defaultValue,c=i.checked!=null?i.checked:i.defaultChecked;a=Pe(i.value!=null?i.value:a),r._wrapperState={initialChecked:c,initialValue:a,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function Ee(r,i){i=i.checked,i!=null&&k(r,"checked",i,!1)}function dt(r,i){Ee(r,i);var a=Pe(i.value),c=i.type;if(a!=null)c==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+a):r.value!==""+a&&(r.value=""+a);else if(c==="submit"||c==="reset"){r.removeAttribute("value");return}i.hasOwnProperty("value")?dn(r,i.type,a):i.hasOwnProperty("defaultValue")&&dn(r,i.type,Pe(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(r.defaultChecked=!!i.defaultChecked)}function cn(r,i,a){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var c=i.type;if(!(c!=="submit"&&c!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+r._wrapperState.initialValue,a||i===r.value||(r.value=i),r.defaultValue=i}a=r.name,a!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,a!==""&&(r.name=a)}function dn(r,i,a){(i!=="number"||un(r.ownerDocument)!==r)&&(a==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+a&&(r.defaultValue=""+a))}var tr=Array.isArray;function nr(r,i,a,c){if(r=r.options,i){i={};for(var h=0;h"+i.valueOf().toString()+"",i=la.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;i.firstChild;)r.appendChild(i.firstChild)}});function Oi(r,i){if(i){var a=r.firstChild;if(a&&a===r.lastChild&&a.nodeType===3){a.nodeValue=i;return}}r.textContent=i}var Ni={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},_1=["Webkit","ms","Moz","O"];Object.keys(Ni).forEach(function(r){_1.forEach(function(i){i=i+r.charAt(0).toUpperCase()+r.substring(1),Ni[i]=Ni[r]})});function Xh(r,i,a){return i==null||typeof i=="boolean"||i===""?"":a||typeof i!="number"||i===0||Ni.hasOwnProperty(r)&&Ni[r]?(""+i).trim():i+"px"}function Yh(r,i){r=r.style;for(var a in i)if(i.hasOwnProperty(a)){var c=a.indexOf("--")===0,h=Xh(a,i[a],c);a==="float"&&(a="cssFloat"),c?r.setProperty(a,h):r[a]=h}}var C1=z({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function vu(r,i){if(i){if(C1[r]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(n(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(n(61))}if(i.style!=null&&typeof i.style!="object")throw Error(n(62))}}function wu(r,i){if(r.indexOf("-")===-1)return typeof i.is=="string";switch(r){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xu=null;function Su(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var bu=null,Os=null,Ns=null;function Jh(r){if(r=eo(r)){if(typeof bu!="function")throw Error(n(280));var i=r.stateNode;i&&(i=Oa(i),bu(r.stateNode,r.type,i))}}function Zh(r){Os?Ns?Ns.push(r):Ns=[r]:Os=r}function ep(){if(Os){var r=Os,i=Ns;if(Ns=Os=null,Jh(r),i)for(r=0;r>>=0,r===0?32:31-(j1(r)/F1|0)|0}var ha=64,pa=4194304;function Ii(r){switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function ma(r,i){var a=r.pendingLanes;if(a===0)return 0;var c=0,h=r.suspendedLanes,m=r.pingedLanes,v=a&268435455;if(v!==0){var C=v&~h;C!==0?c=Ii(C):(m&=v,m!==0&&(c=Ii(m)))}else v=a&~h,v!==0?c=Ii(v):m!==0&&(c=Ii(m));if(c===0)return 0;if(i!==0&&i!==c&&(i&h)===0&&(h=c&-c,m=i&-i,h>=m||h===16&&(m&4194240)!==0))return i;if((c&4)!==0&&(c|=a&16),i=r.entangledLanes,i!==0)for(r=r.entanglements,i&=c;0a;a++)i.push(r);return i}function ji(r,i,a){r.pendingLanes|=i,i!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,i=31-fn(i),r[i]=a}function z1(r,i){var a=r.pendingLanes&~i;r.pendingLanes=i,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=i,r.mutableReadLanes&=i,r.entangledLanes&=i,i=r.entanglements;var c=r.eventTimes;for(r=r.expirationTimes;0=Hi),Rp=" ",Pp=!1;function Ap(r,i){switch(r){case"keyup":return gb.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Op(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Ms=!1;function vb(r,i){switch(r){case"compositionend":return Op(i);case"keypress":return i.which!==32?null:(Pp=!0,Rp);case"textInput":return r=i.data,r===Rp&&Pp?null:r;default:return null}}function wb(r,i){if(Ms)return r==="compositionend"||!Uu&&Ap(r,i)?(r=bp(),xa=Lu=ar=null,Ms=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1=i)return{node:a,offset:i-r};r=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Fp(a)}}function Up(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?Up(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function Vp(){for(var r=window,i=un();i instanceof r.HTMLIFrameElement;){try{var a=typeof i.contentWindow.location.href=="string"}catch{a=!1}if(a)r=i.contentWindow;else break;i=un(r.document)}return i}function $u(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}function Rb(r){var i=Vp(),a=r.focusedElem,c=r.selectionRange;if(i!==a&&a&&a.ownerDocument&&Up(a.ownerDocument.documentElement,a)){if(c!==null&&$u(a)){if(i=c.start,r=c.end,r===void 0&&(r=i),"selectionStart"in a)a.selectionStart=i,a.selectionEnd=Math.min(r,a.value.length);else if(r=(i=a.ownerDocument||document)&&i.defaultView||window,r.getSelection){r=r.getSelection();var h=a.textContent.length,m=Math.min(c.start,h);c=c.end===void 0?m:Math.min(c.end,h),!r.extend&&m>c&&(h=c,c=m,m=h),h=Bp(a,m);var v=Bp(a,c);h&&v&&(r.rangeCount!==1||r.anchorNode!==h.node||r.anchorOffset!==h.offset||r.focusNode!==v.node||r.focusOffset!==v.offset)&&(i=i.createRange(),i.setStart(h.node,h.offset),r.removeAllRanges(),m>c?(r.addRange(i),r.extend(v.node,v.offset)):(i.setEnd(v.node,v.offset),r.addRange(i)))}}for(i=[],r=a;r=r.parentNode;)r.nodeType===1&&i.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a=document.documentMode,Is=null,Wu=null,Gi=null,Hu=!1;function zp(r,i,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Hu||Is==null||Is!==un(c)||(c=Is,"selectionStart"in c&&$u(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Gi&&Qi(Gi,c)||(Gi=c,c=Ra(Wu,"onSelect"),0Vs||(r.current=rc[Vs],rc[Vs]=null,Vs--)}function Be(r,i){Vs++,rc[Vs]=r.current,r.current=i}var dr={},vt=cr(dr),Ot=cr(!1),qr=dr;function zs(r,i){var a=r.type.contextTypes;if(!a)return dr;var c=r.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===i)return c.__reactInternalMemoizedMaskedChildContext;var h={},m;for(m in a)h[m]=i[m];return c&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=i,r.__reactInternalMemoizedMaskedChildContext=h),h}function Nt(r){return r=r.childContextTypes,r!=null}function Na(){Ve(Ot),Ve(vt)}function rm(r,i,a){if(vt.current!==dr)throw Error(n(168));Be(vt,i),Be(Ot,a)}function sm(r,i,a){var c=r.stateNode;if(i=i.childContextTypes,typeof c.getChildContext!="function")return a;c=c.getChildContext();for(var h in c)if(!(h in i))throw Error(n(108,be(r)||"Unknown",h));return z({},a,c)}function Da(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||dr,qr=vt.current,Be(vt,r),Be(Ot,Ot.current),!0}function im(r,i,a){var c=r.stateNode;if(!c)throw Error(n(169));a?(r=sm(r,i,qr),c.__reactInternalMemoizedMergedChildContext=r,Ve(Ot),Ve(vt),Be(vt,r)):Ve(Ot),Be(Ot,a)}var Bn=null,La=!1,sc=!1;function om(r){Bn===null?Bn=[r]:Bn.push(r)}function Ub(r){La=!0,om(r)}function fr(){if(!sc&&Bn!==null){sc=!0;var r=0,i=je;try{var a=Bn;for(je=1;r>=v,h-=v,Un=1<<32-fn(i)+h|a<we?(lt=he,he=null):lt=he.sibling;var Le=W(I,he,j[we],G);if(Le===null){he===null&&(he=lt);break}r&&he&&Le.alternate===null&&i(I,he),D=m(Le,D,we),fe===null?ue=Le:fe.sibling=Le,fe=Le,he=lt}if(we===j.length)return a(I,he),$e&&Qr(I,we),ue;if(he===null){for(;wewe?(lt=he,he=null):lt=he.sibling;var Sr=W(I,he,Le.value,G);if(Sr===null){he===null&&(he=lt);break}r&&he&&Sr.alternate===null&&i(I,he),D=m(Sr,D,we),fe===null?ue=Sr:fe.sibling=Sr,fe=Sr,he=lt}if(Le.done)return a(I,he),$e&&Qr(I,we),ue;if(he===null){for(;!Le.done;we++,Le=j.next())Le=K(I,Le.value,G),Le!==null&&(D=m(Le,D,we),fe===null?ue=Le:fe.sibling=Le,fe=Le);return $e&&Qr(I,we),ue}for(he=c(I,he);!Le.done;we++,Le=j.next())Le=ee(he,I,we,Le.value,G),Le!==null&&(r&&Le.alternate!==null&&he.delete(Le.key===null?we:Le.key),D=m(Le,D,we),fe===null?ue=Le:fe.sibling=Le,fe=Le);return r&&he.forEach(function(xE){return i(I,xE)}),$e&&Qr(I,we),ue}function Ye(I,D,j,G){if(typeof j=="object"&&j!==null&&j.type===q&&j.key===null&&(j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case F:e:{for(var ue=j.key,fe=D;fe!==null;){if(fe.key===ue){if(ue=j.type,ue===q){if(fe.tag===7){a(I,fe.sibling),D=h(fe,j.props.children),D.return=I,I=D;break e}}else if(fe.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===Te&&fm(ue)===fe.type){a(I,fe.sibling),D=h(fe,j.props),D.ref=to(I,fe,j),D.return=I,I=D;break e}a(I,fe);break}else i(I,fe);fe=fe.sibling}j.type===q?(D=ns(j.props.children,I.mode,G,j.key),D.return=I,I=D):(G=ll(j.type,j.key,j.props,null,I.mode,G),G.ref=to(I,D,j),G.return=I,I=G)}return v(I);case V:e:{for(fe=j.key;D!==null;){if(D.key===fe)if(D.tag===4&&D.stateNode.containerInfo===j.containerInfo&&D.stateNode.implementation===j.implementation){a(I,D.sibling),D=h(D,j.children||[]),D.return=I,I=D;break e}else{a(I,D);break}else i(I,D);D=D.sibling}D=td(j,I.mode,G),D.return=I,I=D}return v(I);case Te:return fe=j._init,Ye(I,D,fe(j._payload),G)}if(tr(j))return ie(I,D,j,G);if(se(j))return le(I,D,j,G);Fa(I,j)}return typeof j=="string"&&j!==""||typeof j=="number"?(j=""+j,D!==null&&D.tag===6?(a(I,D.sibling),D=h(D,j),D.return=I,I=D):(a(I,D),D=ed(j,I.mode,G),D.return=I,I=D),v(I)):a(I,D)}return Ye}var qs=hm(!0),pm=hm(!1),Ba=cr(null),Ua=null,Ks=null,cc=null;function dc(){cc=Ks=Ua=null}function fc(r){var i=Ba.current;Ve(Ba),r._currentValue=i}function hc(r,i,a){for(;r!==null;){var c=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),r===a)break;r=r.return}}function Qs(r,i){Ua=r,cc=Ks=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&i)!==0&&(Dt=!0),r.firstContext=null)}function Zt(r){var i=r._currentValue;if(cc!==r)if(r={context:r,memoizedValue:i,next:null},Ks===null){if(Ua===null)throw Error(n(308));Ks=r,Ua.dependencies={lanes:0,firstContext:r}}else Ks=Ks.next=r;return i}var Gr=null;function pc(r){Gr===null?Gr=[r]:Gr.push(r)}function mm(r,i,a,c){var h=i.interleaved;return h===null?(a.next=a,pc(i)):(a.next=h.next,h.next=a),i.interleaved=a,zn(r,c)}function zn(r,i){r.lanes|=i;var a=r.alternate;for(a!==null&&(a.lanes|=i),a=r,r=r.return;r!==null;)r.childLanes|=i,a=r.alternate,a!==null&&(a.childLanes|=i),a=r,r=r.return;return a.tag===3?a.stateNode:null}var hr=!1;function mc(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function gm(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function $n(r,i){return{eventTime:r,lane:i,tag:0,payload:null,callback:null,next:null}}function pr(r,i,a){var c=r.updateQueue;if(c===null)return null;if(c=c.shared,(De&2)!==0){var h=c.pending;return h===null?i.next=i:(i.next=h.next,h.next=i),c.pending=i,zn(r,a)}return h=c.interleaved,h===null?(i.next=i,pc(c)):(i.next=h.next,h.next=i),c.interleaved=i,zn(r,a)}function Va(r,i,a){if(i=i.updateQueue,i!==null&&(i=i.shared,(a&4194240)!==0)){var c=i.lanes;c&=r.pendingLanes,a|=c,i.lanes=a,Pu(r,a)}}function ym(r,i){var a=r.updateQueue,c=r.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var h=null,m=null;if(a=a.firstBaseUpdate,a!==null){do{var v={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};m===null?h=m=v:m=m.next=v,a=a.next}while(a!==null);m===null?h=m=i:m=m.next=i}else h=m=i;a={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:m,shared:c.shared,effects:c.effects},r.updateQueue=a;return}r=a.lastBaseUpdate,r===null?a.firstBaseUpdate=i:r.next=i,a.lastBaseUpdate=i}function za(r,i,a,c){var h=r.updateQueue;hr=!1;var m=h.firstBaseUpdate,v=h.lastBaseUpdate,C=h.shared.pending;if(C!==null){h.shared.pending=null;var O=C,U=O.next;O.next=null,v===null?m=U:v.next=U,v=O;var H=r.alternate;H!==null&&(H=H.updateQueue,C=H.lastBaseUpdate,C!==v&&(C===null?H.firstBaseUpdate=U:C.next=U,H.lastBaseUpdate=O))}if(m!==null){var K=h.baseState;v=0,H=U=O=null,C=m;do{var W=C.lane,ee=C.eventTime;if((c&W)===W){H!==null&&(H=H.next={eventTime:ee,lane:0,tag:C.tag,payload:C.payload,callback:C.callback,next:null});e:{var ie=r,le=C;switch(W=i,ee=a,le.tag){case 1:if(ie=le.payload,typeof ie=="function"){K=ie.call(ee,K,W);break e}K=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=le.payload,W=typeof ie=="function"?ie.call(ee,K,W):ie,W==null)break e;K=z({},K,W);break e;case 2:hr=!0}}C.callback!==null&&C.lane!==0&&(r.flags|=64,W=h.effects,W===null?h.effects=[C]:W.push(C))}else ee={eventTime:ee,lane:W,tag:C.tag,payload:C.payload,callback:C.callback,next:null},H===null?(U=H=ee,O=K):H=H.next=ee,v|=W;if(C=C.next,C===null){if(C=h.shared.pending,C===null)break;W=C,C=W.next,W.next=null,h.lastBaseUpdate=W,h.shared.pending=null}}while(!0);if(H===null&&(O=K),h.baseState=O,h.firstBaseUpdate=U,h.lastBaseUpdate=H,i=h.shared.interleaved,i!==null){h=i;do v|=h.lane,h=h.next;while(h!==i)}else m===null&&(h.shared.lanes=0);Jr|=v,r.lanes=v,r.memoizedState=K}}function vm(r,i,a){if(r=i.effects,i.effects=null,r!==null)for(i=0;ia?a:4,r(!0);var c=xc.transition;xc.transition={};try{r(!1),i()}finally{je=a,xc.transition=c}}function jm(){return en().memoizedState}function Wb(r,i,a){var c=vr(r);if(a={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null},Fm(r))Bm(i,a);else if(a=mm(r,i,a,c),a!==null){var h=Rt();vn(a,r,c,h),Um(a,i,c)}}function Hb(r,i,a){var c=vr(r),h={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null};if(Fm(r))Bm(i,h);else{var m=r.alternate;if(r.lanes===0&&(m===null||m.lanes===0)&&(m=i.lastRenderedReducer,m!==null))try{var v=i.lastRenderedState,C=m(v,a);if(h.hasEagerState=!0,h.eagerState=C,hn(C,v)){var O=i.interleaved;O===null?(h.next=h,pc(i)):(h.next=O.next,O.next=h),i.interleaved=h;return}}catch{}finally{}a=mm(r,i,h,c),a!==null&&(h=Rt(),vn(a,r,c,h),Um(a,i,c))}}function Fm(r){var i=r.alternate;return r===He||i!==null&&i===He}function Bm(r,i){io=Ha=!0;var a=r.pending;a===null?i.next=i:(i.next=a.next,a.next=i),r.pending=i}function Um(r,i,a){if((a&4194240)!==0){var c=i.lanes;c&=r.pendingLanes,a|=c,i.lanes=a,Pu(r,a)}}var Qa={readContext:Zt,useCallback:wt,useContext:wt,useEffect:wt,useImperativeHandle:wt,useInsertionEffect:wt,useLayoutEffect:wt,useMemo:wt,useReducer:wt,useRef:wt,useState:wt,useDebugValue:wt,useDeferredValue:wt,useTransition:wt,useMutableSource:wt,useSyncExternalStore:wt,useId:wt,unstable_isNewReconciler:!1},qb={readContext:Zt,useCallback:function(r,i){return kn().memoizedState=[r,i===void 0?null:i],r},useContext:Zt,useEffect:Pm,useImperativeHandle:function(r,i,a){return a=a!=null?a.concat([r]):null,qa(4194308,4,Nm.bind(null,i,r),a)},useLayoutEffect:function(r,i){return qa(4194308,4,r,i)},useInsertionEffect:function(r,i){return qa(4,2,r,i)},useMemo:function(r,i){var a=kn();return i=i===void 0?null:i,r=r(),a.memoizedState=[r,i],r},useReducer:function(r,i,a){var c=kn();return i=a!==void 0?a(i):i,c.memoizedState=c.baseState=i,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:i},c.queue=r,r=r.dispatch=Wb.bind(null,He,r),[c.memoizedState,r]},useRef:function(r){var i=kn();return r={current:r},i.memoizedState=r},useState:km,useDebugValue:kc,useDeferredValue:function(r){return kn().memoizedState=r},useTransition:function(){var r=km(!1),i=r[0];return r=$b.bind(null,r[1]),kn().memoizedState=r,[i,r]},useMutableSource:function(){},useSyncExternalStore:function(r,i,a){var c=He,h=kn();if($e){if(a===void 0)throw Error(n(407));a=a()}else{if(a=i(),at===null)throw Error(n(349));(Yr&30)!==0||bm(c,i,a)}h.memoizedState=a;var m={value:a,getSnapshot:i};return h.queue=m,Pm(Tm.bind(null,c,m,r),[r]),c.flags|=2048,lo(9,Em.bind(null,c,m,a,i),void 0,null),a},useId:function(){var r=kn(),i=at.identifierPrefix;if($e){var a=Vn,c=Un;a=(c&~(1<<32-fn(c)-1)).toString(32)+a,i=":"+i+"R"+a,a=oo++,0<\/script>",r=r.removeChild(r.firstChild)):typeof c.is=="string"?r=v.createElement(a,{is:c.is}):(r=v.createElement(a),a==="select"&&(v=r,c.multiple?v.multiple=!0:c.size&&(v.size=c.size))):r=v.createElementNS(r,a),r[_n]=i,r[Zi]=c,og(r,i,!1,!1),i.stateNode=r;e:{switch(v=wu(a,c),a){case"dialog":Ue("cancel",r),Ue("close",r),h=c;break;case"iframe":case"object":case"embed":Ue("load",r),h=c;break;case"video":case"audio":for(h=0;hZs&&(i.flags|=128,c=!0,uo(m,!1),i.lanes=4194304)}else{if(!c)if(r=$a(v),r!==null){if(i.flags|=128,c=!0,a=r.updateQueue,a!==null&&(i.updateQueue=a,i.flags|=4),uo(m,!0),m.tail===null&&m.tailMode==="hidden"&&!v.alternate&&!$e)return xt(i),null}else 2*Xe()-m.renderingStartTime>Zs&&a!==1073741824&&(i.flags|=128,c=!0,uo(m,!1),i.lanes=4194304);m.isBackwards?(v.sibling=i.child,i.child=v):(a=m.last,a!==null?a.sibling=v:i.child=v,m.last=v)}return m.tail!==null?(i=m.tail,m.rendering=i,m.tail=i.sibling,m.renderingStartTime=Xe(),i.sibling=null,a=We.current,Be(We,c?a&1|2:a&1),i):(xt(i),null);case 22:case 23:return Yc(),c=i.memoizedState!==null,r!==null&&r.memoizedState!==null!==c&&(i.flags|=8192),c&&(i.mode&1)!==0?(Wt&1073741824)!==0&&(xt(i),i.subtreeFlags&6&&(i.flags|=8192)):xt(i),null;case 24:return null;case 25:return null}throw Error(n(156,i.tag))}function eE(r,i){switch(oc(i),i.tag){case 1:return Nt(i.type)&&Na(),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return Gs(),Ve(Ot),Ve(vt),wc(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 5:return yc(i),null;case 13:if(Ve(We),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(n(340));Hs()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return Ve(We),null;case 4:return Gs(),null;case 10:return fc(i.type._context),null;case 22:case 23:return Yc(),null;case 24:return null;default:return null}}var Ja=!1,St=!1,tE=typeof WeakSet=="function"?WeakSet:Set,re=null;function Ys(r,i){var a=r.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(c){Ke(r,i,c)}else a.current=null}function Bc(r,i,a){try{a()}catch(c){Ke(r,i,c)}}var ug=!1;function nE(r,i){if(Yu=va,r=Vp(),$u(r)){if("selectionStart"in r)var a={start:r.selectionStart,end:r.selectionEnd};else e:{a=(a=r.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var h=c.anchorOffset,m=c.focusNode;c=c.focusOffset;try{a.nodeType,m.nodeType}catch{a=null;break e}var v=0,C=-1,O=-1,U=0,H=0,K=r,W=null;t:for(;;){for(var ee;K!==a||h!==0&&K.nodeType!==3||(C=v+h),K!==m||c!==0&&K.nodeType!==3||(O=v+c),K.nodeType===3&&(v+=K.nodeValue.length),(ee=K.firstChild)!==null;)W=K,K=ee;for(;;){if(K===r)break t;if(W===a&&++U===h&&(C=v),W===m&&++H===c&&(O=v),(ee=K.nextSibling)!==null)break;K=W,W=K.parentNode}K=ee}a=C===-1||O===-1?null:{start:C,end:O}}else a=null}a=a||{start:0,end:0}}else a=null;for(Ju={focusedElem:r,selectionRange:a},va=!1,re=i;re!==null;)if(i=re,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,re=r;else for(;re!==null;){i=re;try{var ie=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(ie!==null){var le=ie.memoizedProps,Ye=ie.memoizedState,I=i.stateNode,D=I.getSnapshotBeforeUpdate(i.elementType===i.type?le:mn(i.type,le),Ye);I.__reactInternalSnapshotBeforeUpdate=D}break;case 3:var j=i.stateNode.containerInfo;j.nodeType===1?j.textContent="":j.nodeType===9&&j.documentElement&&j.removeChild(j.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(G){Ke(i,i.return,G)}if(r=i.sibling,r!==null){r.return=i.return,re=r;break}re=i.return}return ie=ug,ug=!1,ie}function co(r,i,a){var c=i.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var h=c=c.next;do{if((h.tag&r)===r){var m=h.destroy;h.destroy=void 0,m!==void 0&&Bc(i,a,m)}h=h.next}while(h!==c)}}function Za(r,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var a=i=i.next;do{if((a.tag&r)===r){var c=a.create;a.destroy=c()}a=a.next}while(a!==i)}}function Uc(r){var i=r.ref;if(i!==null){var a=r.stateNode;switch(r.tag){case 5:r=a;break;default:r=a}typeof i=="function"?i(r):i.current=r}}function cg(r){var i=r.alternate;i!==null&&(r.alternate=null,cg(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&(delete i[_n],delete i[Zi],delete i[nc],delete i[Fb],delete i[Bb])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function dg(r){return r.tag===5||r.tag===3||r.tag===4}function fg(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||dg(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Vc(r,i,a){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?a.nodeType===8?a.parentNode.insertBefore(r,i):a.insertBefore(r,i):(a.nodeType===8?(i=a.parentNode,i.insertBefore(r,a)):(i=a,i.appendChild(r)),a=a._reactRootContainer,a!=null||i.onclick!==null||(i.onclick=Aa));else if(c!==4&&(r=r.child,r!==null))for(Vc(r,i,a),r=r.sibling;r!==null;)Vc(r,i,a),r=r.sibling}function zc(r,i,a){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?a.insertBefore(r,i):a.appendChild(r);else if(c!==4&&(r=r.child,r!==null))for(zc(r,i,a),r=r.sibling;r!==null;)zc(r,i,a),r=r.sibling}var ft=null,gn=!1;function mr(r,i,a){for(a=a.child;a!==null;)hg(r,i,a),a=a.sibling}function hg(r,i,a){if(Tn&&typeof Tn.onCommitFiberUnmount=="function")try{Tn.onCommitFiberUnmount(fa,a)}catch{}switch(a.tag){case 5:St||Ys(a,i);case 6:var c=ft,h=gn;ft=null,mr(r,i,a),ft=c,gn=h,ft!==null&&(gn?(r=ft,a=a.stateNode,r.nodeType===8?r.parentNode.removeChild(a):r.removeChild(a)):ft.removeChild(a.stateNode));break;case 18:ft!==null&&(gn?(r=ft,a=a.stateNode,r.nodeType===8?tc(r.parentNode,a):r.nodeType===1&&tc(r,a),zi(r)):tc(ft,a.stateNode));break;case 4:c=ft,h=gn,ft=a.stateNode.containerInfo,gn=!0,mr(r,i,a),ft=c,gn=h;break;case 0:case 11:case 14:case 15:if(!St&&(c=a.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){h=c=c.next;do{var m=h,v=m.destroy;m=m.tag,v!==void 0&&((m&2)!==0||(m&4)!==0)&&Bc(a,i,v),h=h.next}while(h!==c)}mr(r,i,a);break;case 1:if(!St&&(Ys(a,i),c=a.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=a.memoizedProps,c.state=a.memoizedState,c.componentWillUnmount()}catch(C){Ke(a,i,C)}mr(r,i,a);break;case 21:mr(r,i,a);break;case 22:a.mode&1?(St=(c=St)||a.memoizedState!==null,mr(r,i,a),St=c):mr(r,i,a);break;default:mr(r,i,a)}}function pg(r){var i=r.updateQueue;if(i!==null){r.updateQueue=null;var a=r.stateNode;a===null&&(a=r.stateNode=new tE),i.forEach(function(c){var h=dE.bind(null,r,c);a.has(c)||(a.add(c),c.then(h,h))})}}function yn(r,i){var a=i.deletions;if(a!==null)for(var c=0;ch&&(h=v),c&=~m}if(c=h,c=Xe()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*sE(c/1960))-c,10r?16:r,yr===null)var c=!1;else{if(r=yr,yr=null,sl=0,(De&6)!==0)throw Error(n(331));var h=De;for(De|=4,re=r.current;re!==null;){var m=re,v=m.child;if((re.flags&16)!==0){var C=m.deletions;if(C!==null){for(var O=0;OXe()-Hc?es(r,0):Wc|=a),Mt(r,i)}function kg(r,i){i===0&&((r.mode&1)===0?i=1:(i=pa,pa<<=1,(pa&130023424)===0&&(pa=4194304)));var a=Rt();r=zn(r,i),r!==null&&(ji(r,i,a),Mt(r,a))}function cE(r){var i=r.memoizedState,a=0;i!==null&&(a=i.retryLane),kg(r,a)}function dE(r,i){var a=0;switch(r.tag){case 13:var c=r.stateNode,h=r.memoizedState;h!==null&&(a=h.retryLane);break;case 19:c=r.stateNode;break;default:throw Error(n(314))}c!==null&&c.delete(i),kg(r,a)}var Rg;Rg=function(r,i,a){if(r!==null)if(r.memoizedProps!==i.pendingProps||Ot.current)Dt=!0;else{if((r.lanes&a)===0&&(i.flags&128)===0)return Dt=!1,Jb(r,i,a);Dt=(r.flags&131072)!==0}else Dt=!1,$e&&(i.flags&1048576)!==0&&am(i,Ia,i.index);switch(i.lanes=0,i.tag){case 2:var c=i.type;Ya(r,i),r=i.pendingProps;var h=zs(i,vt.current);Qs(i,a),h=bc(null,i,c,r,h,a);var m=Ec();return i.flags|=1,typeof h=="object"&&h!==null&&typeof h.render=="function"&&h.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,Nt(c)?(m=!0,Da(i)):m=!1,i.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,mc(i),h.updater=Ga,i.stateNode=h,h._reactInternals=i,Pc(i,c,r,a),i=Dc(null,i,c,!0,m,a)):(i.tag=0,$e&&m&&ic(i),kt(null,i,h,a),i=i.child),i;case 16:c=i.elementType;e:{switch(Ya(r,i),r=i.pendingProps,h=c._init,c=h(c._payload),i.type=c,h=i.tag=hE(c),r=mn(c,r),h){case 0:i=Nc(null,i,c,r,a);break e;case 1:i=eg(null,i,c,r,a);break e;case 11:i=Gm(null,i,c,r,a);break e;case 14:i=Xm(null,i,c,mn(c.type,r),a);break e}throw Error(n(306,c,""))}return i;case 0:return c=i.type,h=i.pendingProps,h=i.elementType===c?h:mn(c,h),Nc(r,i,c,h,a);case 1:return c=i.type,h=i.pendingProps,h=i.elementType===c?h:mn(c,h),eg(r,i,c,h,a);case 3:e:{if(tg(i),r===null)throw Error(n(387));c=i.pendingProps,m=i.memoizedState,h=m.element,gm(r,i),za(i,c,null,a);var v=i.memoizedState;if(c=v.element,m.isDehydrated)if(m={element:c,isDehydrated:!1,cache:v.cache,pendingSuspenseBoundaries:v.pendingSuspenseBoundaries,transitions:v.transitions},i.updateQueue.baseState=m,i.memoizedState=m,i.flags&256){h=Xs(Error(n(423)),i),i=ng(r,i,c,a,h);break e}else if(c!==h){h=Xs(Error(n(424)),i),i=ng(r,i,c,a,h);break e}else for($t=ur(i.stateNode.containerInfo.firstChild),zt=i,$e=!0,pn=null,a=pm(i,null,c,a),i.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Hs(),c===h){i=Wn(r,i,a);break e}kt(r,i,c,a)}i=i.child}return i;case 5:return wm(i),r===null&&lc(i),c=i.type,h=i.pendingProps,m=r!==null?r.memoizedProps:null,v=h.children,Zu(c,h)?v=null:m!==null&&Zu(c,m)&&(i.flags|=32),Zm(r,i),kt(r,i,v,a),i.child;case 6:return r===null&&lc(i),null;case 13:return rg(r,i,a);case 4:return gc(i,i.stateNode.containerInfo),c=i.pendingProps,r===null?i.child=qs(i,null,c,a):kt(r,i,c,a),i.child;case 11:return c=i.type,h=i.pendingProps,h=i.elementType===c?h:mn(c,h),Gm(r,i,c,h,a);case 7:return kt(r,i,i.pendingProps,a),i.child;case 8:return kt(r,i,i.pendingProps.children,a),i.child;case 12:return kt(r,i,i.pendingProps.children,a),i.child;case 10:e:{if(c=i.type._context,h=i.pendingProps,m=i.memoizedProps,v=h.value,Be(Ba,c._currentValue),c._currentValue=v,m!==null)if(hn(m.value,v)){if(m.children===h.children&&!Ot.current){i=Wn(r,i,a);break e}}else for(m=i.child,m!==null&&(m.return=i);m!==null;){var C=m.dependencies;if(C!==null){v=m.child;for(var O=C.firstContext;O!==null;){if(O.context===c){if(m.tag===1){O=$n(-1,a&-a),O.tag=2;var U=m.updateQueue;if(U!==null){U=U.shared;var H=U.pending;H===null?O.next=O:(O.next=H.next,H.next=O),U.pending=O}}m.lanes|=a,O=m.alternate,O!==null&&(O.lanes|=a),hc(m.return,a,i),C.lanes|=a;break}O=O.next}}else if(m.tag===10)v=m.type===i.type?null:m.child;else if(m.tag===18){if(v=m.return,v===null)throw Error(n(341));v.lanes|=a,C=v.alternate,C!==null&&(C.lanes|=a),hc(v,a,i),v=m.sibling}else v=m.child;if(v!==null)v.return=m;else for(v=m;v!==null;){if(v===i){v=null;break}if(m=v.sibling,m!==null){m.return=v.return,v=m;break}v=v.return}m=v}kt(r,i,h.children,a),i=i.child}return i;case 9:return h=i.type,c=i.pendingProps.children,Qs(i,a),h=Zt(h),c=c(h),i.flags|=1,kt(r,i,c,a),i.child;case 14:return c=i.type,h=mn(c,i.pendingProps),h=mn(c.type,h),Xm(r,i,c,h,a);case 15:return Ym(r,i,i.type,i.pendingProps,a);case 17:return c=i.type,h=i.pendingProps,h=i.elementType===c?h:mn(c,h),Ya(r,i),i.tag=1,Nt(c)?(r=!0,Da(i)):r=!1,Qs(i,a),zm(i,c,h),Pc(i,c,h,a),Dc(null,i,c,!0,r,a);case 19:return ig(r,i,a);case 22:return Jm(r,i,a)}throw Error(n(156,i.tag))};function Pg(r,i){return lp(r,i)}function fE(r,i,a,c){this.tag=r,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nn(r,i,a,c){return new fE(r,i,a,c)}function Zc(r){return r=r.prototype,!(!r||!r.isReactComponent)}function hE(r){if(typeof r=="function")return Zc(r)?1:0;if(r!=null){if(r=r.$$typeof,r===Ce)return 11;if(r===_e)return 14}return 2}function xr(r,i){var a=r.alternate;return a===null?(a=nn(r.tag,i,r.key,r.mode),a.elementType=r.elementType,a.type=r.type,a.stateNode=r.stateNode,a.alternate=r,r.alternate=a):(a.pendingProps=i,a.type=r.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=r.flags&14680064,a.childLanes=r.childLanes,a.lanes=r.lanes,a.child=r.child,a.memoizedProps=r.memoizedProps,a.memoizedState=r.memoizedState,a.updateQueue=r.updateQueue,i=r.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},a.sibling=r.sibling,a.index=r.index,a.ref=r.ref,a}function ll(r,i,a,c,h,m){var v=2;if(c=r,typeof r=="function")Zc(r)&&(v=1);else if(typeof r=="string")v=5;else e:switch(r){case q:return ns(a.children,h,m,i);case B:v=8,h|=8;break;case Y:return r=nn(12,a,i,h|2),r.elementType=Y,r.lanes=m,r;case Se:return r=nn(13,a,i,h),r.elementType=Se,r.lanes=m,r;case Z:return r=nn(19,a,i,h),r.elementType=Z,r.lanes=m,r;case ce:return ul(a,h,m,i);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case ne:v=10;break e;case ve:v=9;break e;case Ce:v=11;break e;case _e:v=14;break e;case Te:v=16,c=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return i=nn(v,a,i,h),i.elementType=r,i.type=c,i.lanes=m,i}function ns(r,i,a,c){return r=nn(7,r,c,i),r.lanes=a,r}function ul(r,i,a,c){return r=nn(22,r,c,i),r.elementType=ce,r.lanes=a,r.stateNode={isHidden:!1},r}function ed(r,i,a){return r=nn(6,r,null,i),r.lanes=a,r}function td(r,i,a){return i=nn(4,r.children!==null?r.children:[],r.key,i),i.lanes=a,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}function pE(r,i,a,c,h){this.tag=i,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ru(0),this.expirationTimes=Ru(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ru(0),this.identifierPrefix=c,this.onRecoverableError=h,this.mutableSourceEagerHydrationData=null}function nd(r,i,a,c,h,m,v,C,O){return r=new pE(r,i,a,C,O),i===1?(i=1,m===!0&&(i|=8)):i=0,m=nn(3,null,null,i),r.current=m,m.stateNode=r,m.memoizedState={element:c,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},mc(m),r}function mE(r,i,a){var c=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),ud.exports=PE(),ud.exports}var Wg;function AE(){if(Wg)return yl;Wg=1;var t=F0();return yl.createRoot=t.createRoot,yl.hydrateRoot=t.hydrateRoot,yl}var OE=AE();const NE=Ff(OE),DE=20,LE=1e6,Yn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let fd=0;function ME(){return fd=(fd+1)%Number.MAX_VALUE,fd.toString()}const hd=new Map,Hg=t=>{if(hd.has(t))return;const e=setTimeout(()=>{hd.delete(t),Oo({type:Yn.REMOVE_TOAST,toastId:t})},LE);hd.set(t,e)},IE=(t,e)=>{switch(e.type){case Yn.ADD_TOAST:return{...t,toasts:[e.toast,...t.toasts].slice(0,DE)};case Yn.UPDATE_TOAST:return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case Yn.DISMISS_TOAST:{const{toastId:n}=e;return n?Hg(n):t.toasts.forEach(s=>{Hg(s.id)}),{...t,toasts:t.toasts.map(s=>s.id===n||n===void 0?{...s,open:!1}:s)}}case Yn.REMOVE_TOAST:return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},Al=[];let Ol={toasts:[]};function Oo(t){Ol=IE(Ol,t),Al.forEach(e=>{e(Ol)})}function jE({...t}){const e=ME(),n=o=>Oo({type:Yn.UPDATE_TOAST,toast:{...o,id:e}}),s=()=>Oo({type:Yn.DISMISS_TOAST,toastId:e});return Oo({type:Yn.ADD_TOAST,toast:{...t,id:e,open:!0,onOpenChange:o=>{o||s()}}}),{id:e,dismiss:s,update:n}}function FE(){const[t,e]=_.useState(Ol);return _.useEffect(()=>(Al.push(e),()=>{const n=Al.indexOf(e);n>-1&&Al.splice(n,1)}),[t]),{...t,toast:jE,dismiss:n=>Oo({type:Yn.DISMISS_TOAST,toastId:n})}}var Uf=F0();const BE=Ff(Uf);function Ht(t,e,{checkForDefaultPrevented:n=!0}={}){return function(o){if(t==null||t(o),n===!1||!o.defaultPrevented)return e==null?void 0:e(o)}}function qg(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Vf(...t){return e=>{let n=!1;const s=t.map(o=>{const l=qg(o,e);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let o=0;o{var S;const{scope:w,children:E,...R}=y,b=((S=w==null?void 0:w[t])==null?void 0:S[f])||d,x=_.useMemo(()=>R,Object.values(R));return T.jsx(b.Provider,{value:x,children:E})};p.displayName=l+"Provider";function g(y,w){var b;const E=((b=w==null?void 0:w[t])==null?void 0:b[f])||d,R=_.useContext(E);if(R)return R;if(u!==void 0)return u;throw new Error(`\`${y}\` must be used within \`${l}\``)}return[p,g]}const o=()=>{const l=n.map(u=>_.createContext(u));return function(d){const f=(d==null?void 0:d[t])||l;return _.useMemo(()=>({[`__scope${t}`]:{...d,[t]:f}}),[d,f])}};return o.scopeName=t,[s,UE(o,...e)]}function UE(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const s=t.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(l){const u=s.reduce((d,{useScope:f,scopeName:p})=>{const y=f(l)[`__scope${p}`];return{...d,...y}},{});return _.useMemo(()=>({[`__scope${e.scopeName}`]:u}),[u])}};return n.scopeName=e.scopeName,n}function Kg(t){const e=VE(t),n=_.forwardRef((s,o)=>{const{children:l,...u}=s,d=_.Children.toArray(l),f=d.find($E);if(f){const p=f.props.children,g=d.map(y=>y===f?_.Children.count(p)>1?_.Children.only(null):_.isValidElement(p)?p.props.children:null:y);return T.jsx(e,{...u,ref:o,children:_.isValidElement(p)?_.cloneElement(p,void 0,g):null})}return T.jsx(e,{...u,ref:o,children:l})});return n.displayName=`${t}.Slot`,n}function VE(t){const e=_.forwardRef((n,s)=>{const{children:o,...l}=n;if(_.isValidElement(o)){const u=HE(o),d=WE(l,o.props);return o.type!==_.Fragment&&(d.ref=s?Vf(s,u):u),_.cloneElement(o,d)}return _.Children.count(o)>1?_.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var zE=Symbol("radix.slottable");function $E(t){return _.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===zE}function WE(t,e){const n={...e};for(const s in e){const o=t[s],l=e[s];/^on[A-Z]/.test(s)?o&&l?n[s]=(...d)=>{const f=l(...d);return o(...d),f}:o&&(n[s]=o):s==="style"?n[s]={...o,...l}:s==="className"&&(n[s]=[o,l].filter(Boolean).join(" "))}return{...t,...n}}function HE(t){var s,o;let e=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function qE(t){const e=t+"CollectionProvider",[n,s]=B0(e),[o,l]=n(e,{collectionRef:{current:null},itemMap:new Map}),u=b=>{const{scope:x,children:S}=b,P=Tr.useRef(null),k=Tr.useRef(new Map).current;return T.jsx(o,{scope:x,itemMap:k,collectionRef:P,children:S})};u.displayName=e;const d=t+"CollectionSlot",f=Kg(d),p=Tr.forwardRef((b,x)=>{const{scope:S,children:P}=b,k=l(d,S),A=Ts(x,k.collectionRef);return T.jsx(f,{ref:A,children:P})});p.displayName=d;const g=t+"CollectionItemSlot",y="data-radix-collection-item",w=Kg(g),E=Tr.forwardRef((b,x)=>{const{scope:S,children:P,...k}=b,A=Tr.useRef(null),F=Ts(x,A),V=l(g,S);return Tr.useEffect(()=>(V.itemMap.set(A,{ref:A,...k}),()=>void V.itemMap.delete(A))),T.jsx(w,{[y]:"",ref:F,children:P})});E.displayName=g;function R(b){const x=l(t+"CollectionConsumer",b);return Tr.useCallback(()=>{const P=x.collectionRef.current;if(!P)return[];const k=Array.from(P.querySelectorAll(`[${y}]`));return Array.from(x.itemMap.values()).sort((V,q)=>k.indexOf(V.ref.current)-k.indexOf(q.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:u,Slot:p,ItemSlot:E},R,s]}function KE(t){const e=QE(t),n=_.forwardRef((s,o)=>{const{children:l,...u}=s,d=_.Children.toArray(l),f=d.find(XE);if(f){const p=f.props.children,g=d.map(y=>y===f?_.Children.count(p)>1?_.Children.only(null):_.isValidElement(p)?p.props.children:null:y);return T.jsx(e,{...u,ref:o,children:_.isValidElement(p)?_.cloneElement(p,void 0,g):null})}return T.jsx(e,{...u,ref:o,children:l})});return n.displayName=`${t}.Slot`,n}function QE(t){const e=_.forwardRef((n,s)=>{const{children:o,...l}=n;if(_.isValidElement(o)){const u=JE(o),d=YE(l,o.props);return o.type!==_.Fragment&&(d.ref=s?Vf(s,u):u),_.cloneElement(o,d)}return _.Children.count(o)>1?_.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var GE=Symbol("radix.slottable");function XE(t){return _.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===GE}function YE(t,e){const n={...e};for(const s in e){const o=t[s],l=e[s];/^on[A-Z]/.test(s)?o&&l?n[s]=(...d)=>{const f=l(...d);return o(...d),f}:o&&(n[s]=o):s==="style"?n[s]={...o,...l}:s==="className"&&(n[s]=[o,l].filter(Boolean).join(" "))}return{...t,...n}}function JE(t){var s,o;let e=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var ZE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],In=ZE.reduce((t,e)=>{const n=KE(`Primitive.${e}`),s=_.forwardRef((o,l)=>{const{asChild:u,...d}=o,f=u?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(f,{...d,ref:l})});return s.displayName=`Primitive.${e}`,{...t,[e]:s}},{});function U0(t,e){t&&Uf.flushSync(()=>t.dispatchEvent(e))}function _s(t){const e=_.useRef(t);return _.useEffect(()=>{e.current=t}),_.useMemo(()=>(...n)=>{var s;return(s=e.current)==null?void 0:s.call(e,...n)},[])}function eT(t,e=globalThis==null?void 0:globalThis.document){const n=_s(t);_.useEffect(()=>{const s=o=>{o.key==="Escape"&&n(o)};return e.addEventListener("keydown",s,{capture:!0}),()=>e.removeEventListener("keydown",s,{capture:!0})},[n,e])}var tT="DismissableLayer",Vd="dismissableLayer.update",nT="dismissableLayer.pointerDownOutside",rT="dismissableLayer.focusOutside",Qg,V0=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),z0=_.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:u,onDismiss:d,...f}=t,p=_.useContext(V0),[g,y]=_.useState(null),w=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,E]=_.useState({}),R=Ts(e,q=>y(q)),b=Array.from(p.layers),[x]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),S=b.indexOf(x),P=g?b.indexOf(g):-1,k=p.layersWithOutsidePointerEventsDisabled.size>0,A=P>=S,F=iT(q=>{const B=q.target,Y=[...p.branches].some(ne=>ne.contains(B));!A||Y||(o==null||o(q),u==null||u(q),q.defaultPrevented||d==null||d())},w),V=oT(q=>{const B=q.target;[...p.branches].some(ne=>ne.contains(B))||(l==null||l(q),u==null||u(q),q.defaultPrevented||d==null||d())},w);return eT(q=>{P===p.layers.size-1&&(s==null||s(q),!q.defaultPrevented&&d&&(q.preventDefault(),d()))},w),_.useEffect(()=>{if(g)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Qg=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(g)),p.layers.add(g),Gg(),()=>{n&&p.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=Qg)}},[g,w,n,p]),_.useEffect(()=>()=>{g&&(p.layers.delete(g),p.layersWithOutsidePointerEventsDisabled.delete(g),Gg())},[g,p]),_.useEffect(()=>{const q=()=>E({});return document.addEventListener(Vd,q),()=>document.removeEventListener(Vd,q)},[]),T.jsx(In.div,{...f,ref:R,style:{pointerEvents:k?A?"auto":"none":void 0,...t.style},onFocusCapture:Ht(t.onFocusCapture,V.onFocusCapture),onBlurCapture:Ht(t.onBlurCapture,V.onBlurCapture),onPointerDownCapture:Ht(t.onPointerDownCapture,F.onPointerDownCapture)})});z0.displayName=tT;var sT="DismissableLayerBranch",$0=_.forwardRef((t,e)=>{const n=_.useContext(V0),s=_.useRef(null),o=Ts(e,s);return _.useEffect(()=>{const l=s.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),T.jsx(In.div,{...t,ref:o})});$0.displayName=sT;function iT(t,e=globalThis==null?void 0:globalThis.document){const n=_s(t),s=_.useRef(!1),o=_.useRef(()=>{});return _.useEffect(()=>{const l=d=>{if(d.target&&!s.current){let f=function(){W0(nT,n,p,{discrete:!0})};const p={originalEvent:d};d.pointerType==="touch"?(e.removeEventListener("click",o.current),o.current=f,e.addEventListener("click",o.current,{once:!0})):f()}else e.removeEventListener("click",o.current);s.current=!1},u=window.setTimeout(()=>{e.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(u),e.removeEventListener("pointerdown",l),e.removeEventListener("click",o.current)}},[e,n]),{onPointerDownCapture:()=>s.current=!0}}function oT(t,e=globalThis==null?void 0:globalThis.document){const n=_s(t),s=_.useRef(!1);return _.useEffect(()=>{const o=l=>{l.target&&!s.current&&W0(rT,n,{originalEvent:l},{discrete:!1})};return e.addEventListener("focusin",o),()=>e.removeEventListener("focusin",o)},[e,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function Gg(){const t=new CustomEvent(Vd);document.dispatchEvent(t)}function W0(t,e,n,{discrete:s}){const o=n.originalEvent.target,l=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&o.addEventListener(t,e,{once:!0}),s?U0(o,l):o.dispatchEvent(l)}var aT=z0,lT=$0,jo=globalThis!=null&&globalThis.document?_.useLayoutEffect:()=>{},uT="Portal",H0=_.forwardRef((t,e)=>{var d;const{container:n,...s}=t,[o,l]=_.useState(!1);jo(()=>l(!0),[]);const u=n||o&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return u?BE.createPortal(T.jsx(In.div,{...s,ref:e}),u):null});H0.displayName=uT;function cT(t,e){return _.useReducer((n,s)=>e[n][s]??n,t)}var q0=t=>{const{present:e,children:n}=t,s=dT(e),o=typeof n=="function"?n({present:s.isPresent}):_.Children.only(n),l=Ts(s.ref,fT(o));return typeof n=="function"||s.isPresent?_.cloneElement(o,{ref:l}):null};q0.displayName="Presence";function dT(t){const[e,n]=_.useState(),s=_.useRef(null),o=_.useRef(t),l=_.useRef("none"),u=t?"mounted":"unmounted",[d,f]=cT(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const p=vl(s.current);l.current=d==="mounted"?p:"none"},[d]),jo(()=>{const p=s.current,g=o.current;if(g!==t){const w=l.current,E=vl(p);t?f("MOUNT"):E==="none"||(p==null?void 0:p.display)==="none"?f("UNMOUNT"):f(g&&w!==E?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,f]),jo(()=>{if(e){let p;const g=e.ownerDocument.defaultView??window,y=E=>{const b=vl(s.current).includes(CSS.escape(E.animationName));if(E.target===e&&b&&(f("ANIMATION_END"),!o.current)){const x=e.style.animationFillMode;e.style.animationFillMode="forwards",p=g.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=x)})}},w=E=>{E.target===e&&(l.current=vl(s.current))};return e.addEventListener("animationstart",w),e.addEventListener("animationcancel",y),e.addEventListener("animationend",y),()=>{g.clearTimeout(p),e.removeEventListener("animationstart",w),e.removeEventListener("animationcancel",y),e.removeEventListener("animationend",y)}}else f("ANIMATION_END")},[e,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:_.useCallback(p=>{s.current=p?getComputedStyle(p):null,n(p)},[])}}function vl(t){return(t==null?void 0:t.animationName)||"none"}function fT(t){var s,o;let e=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var hT=j0[" useInsertionEffect ".trim().toString()]||jo;function pT({prop:t,defaultProp:e,onChange:n=()=>{},caller:s}){const[o,l,u]=mT({defaultProp:e,onChange:n}),d=t!==void 0,f=d?t:o;{const g=_.useRef(t!==void 0);_.useEffect(()=>{const y=g.current;y!==d&&console.warn(`${s} is changing from ${y?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=d},[d,s])}const p=_.useCallback(g=>{var y;if(d){const w=gT(g)?g(t):g;w!==t&&((y=u.current)==null||y.call(u,w))}else l(g)},[d,t,l,u]);return[f,p]}function mT({defaultProp:t,onChange:e}){const[n,s]=_.useState(t),o=_.useRef(n),l=_.useRef(e);return hT(()=>{l.current=e},[e]),_.useEffect(()=>{var u;o.current!==n&&((u=l.current)==null||u.call(l,n),o.current=n)},[n,o]),[n,s,l]}function gT(t){return typeof t=="function"}var yT=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),vT="VisuallyHidden",zf=_.forwardRef((t,e)=>T.jsx(In.span,{...t,ref:e,style:{...yT,...t.style}}));zf.displayName=vT;var $f="ToastProvider",[Wf,wT,xT]=qE("Toast"),[K0]=B0("Toast",[xT]),[ST,su]=K0($f),Q0=t=>{const{__scopeToast:e,label:n="Notification",duration:s=5e3,swipeDirection:o="right",swipeThreshold:l=50,children:u}=t,[d,f]=_.useState(null),[p,g]=_.useState(0),y=_.useRef(!1),w=_.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${$f}\`. Expected non-empty \`string\`.`),T.jsx(Wf.Provider,{scope:e,children:T.jsx(ST,{scope:e,label:n,duration:s,swipeDirection:o,swipeThreshold:l,toastCount:p,viewport:d,onViewportChange:f,onToastAdd:_.useCallback(()=>g(E=>E+1),[]),onToastRemove:_.useCallback(()=>g(E=>E-1),[]),isFocusedToastEscapeKeyDownRef:y,isClosePausedRef:w,children:u})})};Q0.displayName=$f;var G0="ToastViewport",bT=["F8"],zd="toast.viewportPause",$d="toast.viewportResume",X0=_.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:s=bT,label:o="Notifications ({hotkey})",...l}=t,u=su(G0,n),d=wT(n),f=_.useRef(null),p=_.useRef(null),g=_.useRef(null),y=_.useRef(null),w=Ts(e,y,u.onViewportChange),E=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=u.toastCount>0;_.useEffect(()=>{const x=S=>{var k;s.length!==0&&s.every(A=>S[A]||S.code===A)&&((k=y.current)==null||k.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[s]),_.useEffect(()=>{const x=f.current,S=y.current;if(R&&x&&S){const P=()=>{if(!u.isClosePausedRef.current){const V=new CustomEvent(zd);S.dispatchEvent(V),u.isClosePausedRef.current=!0}},k=()=>{if(u.isClosePausedRef.current){const V=new CustomEvent($d);S.dispatchEvent(V),u.isClosePausedRef.current=!1}},A=V=>{!x.contains(V.relatedTarget)&&k()},F=()=>{x.contains(document.activeElement)||k()};return x.addEventListener("focusin",P),x.addEventListener("focusout",A),x.addEventListener("pointermove",P),x.addEventListener("pointerleave",F),window.addEventListener("blur",P),window.addEventListener("focus",k),()=>{x.removeEventListener("focusin",P),x.removeEventListener("focusout",A),x.removeEventListener("pointermove",P),x.removeEventListener("pointerleave",F),window.removeEventListener("blur",P),window.removeEventListener("focus",k)}}},[R,u.isClosePausedRef]);const b=_.useCallback(({tabbingDirection:x})=>{const P=d().map(k=>{const A=k.ref.current,F=[A,...MT(A)];return x==="forwards"?F:F.reverse()});return(x==="forwards"?P.reverse():P).flat()},[d]);return _.useEffect(()=>{const x=y.current;if(x){const S=P=>{var F,V,q;const k=P.altKey||P.ctrlKey||P.metaKey;if(P.key==="Tab"&&!k){const B=document.activeElement,Y=P.shiftKey;if(P.target===x&&Y){(F=p.current)==null||F.focus();return}const Ce=b({tabbingDirection:Y?"backwards":"forwards"}),Se=Ce.findIndex(Z=>Z===B);pd(Ce.slice(Se+1))?P.preventDefault():Y?(V=p.current)==null||V.focus():(q=g.current)==null||q.focus()}};return x.addEventListener("keydown",S),()=>x.removeEventListener("keydown",S)}},[d,b]),T.jsxs(lT,{ref:f,role:"region","aria-label":o.replace("{hotkey}",E),tabIndex:-1,style:{pointerEvents:R?void 0:"none"},children:[R&&T.jsx(Wd,{ref:p,onFocusFromOutsideViewport:()=>{const x=b({tabbingDirection:"forwards"});pd(x)}}),T.jsx(Wf.Slot,{scope:n,children:T.jsx(In.ol,{tabIndex:-1,...l,ref:w})}),R&&T.jsx(Wd,{ref:g,onFocusFromOutsideViewport:()=>{const x=b({tabbingDirection:"backwards"});pd(x)}})]})});X0.displayName=G0;var Y0="ToastFocusProxy",Wd=_.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:s,...o}=t,l=su(Y0,n);return T.jsx(zf,{tabIndex:0,...o,ref:e,style:{position:"fixed"},onFocus:u=>{var p;const d=u.relatedTarget;!((p=l.viewport)!=null&&p.contains(d))&&s()}})});Wd.displayName=Y0;var Yo="Toast",ET="toast.swipeStart",TT="toast.swipeMove",_T="toast.swipeCancel",CT="toast.swipeEnd",J0=_.forwardRef((t,e)=>{const{forceMount:n,open:s,defaultOpen:o,onOpenChange:l,...u}=t,[d,f]=pT({prop:s,defaultProp:o??!0,onChange:l,caller:Yo});return T.jsx(q0,{present:n||d,children:T.jsx(PT,{open:d,...u,ref:e,onClose:()=>f(!1),onPause:_s(t.onPause),onResume:_s(t.onResume),onSwipeStart:Ht(t.onSwipeStart,p=>{p.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ht(t.onSwipeMove,p=>{const{x:g,y}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","move"),p.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${g}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${y}px`)}),onSwipeCancel:Ht(t.onSwipeCancel,p=>{p.currentTarget.setAttribute("data-swipe","cancel"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Ht(t.onSwipeEnd,p=>{const{x:g,y}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","end"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${g}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${y}px`),f(!1)})})})});J0.displayName=Yo;var[kT,RT]=K0(Yo,{onClose(){}}),PT=_.forwardRef((t,e)=>{const{__scopeToast:n,type:s="foreground",duration:o,open:l,onClose:u,onEscapeKeyDown:d,onPause:f,onResume:p,onSwipeStart:g,onSwipeMove:y,onSwipeCancel:w,onSwipeEnd:E,...R}=t,b=su(Yo,n),[x,S]=_.useState(null),P=Ts(e,Z=>S(Z)),k=_.useRef(null),A=_.useRef(null),F=o||b.duration,V=_.useRef(0),q=_.useRef(F),B=_.useRef(0),{onToastAdd:Y,onToastRemove:ne}=b,ve=_s(()=>{var _e;(x==null?void 0:x.contains(document.activeElement))&&((_e=b.viewport)==null||_e.focus()),u()}),Ce=_.useCallback(Z=>{!Z||Z===1/0||(window.clearTimeout(B.current),V.current=new Date().getTime(),B.current=window.setTimeout(ve,Z))},[ve]);_.useEffect(()=>{const Z=b.viewport;if(Z){const _e=()=>{Ce(q.current),p==null||p()},Te=()=>{const ce=new Date().getTime()-V.current;q.current=q.current-ce,window.clearTimeout(B.current),f==null||f()};return Z.addEventListener(zd,Te),Z.addEventListener($d,_e),()=>{Z.removeEventListener(zd,Te),Z.removeEventListener($d,_e)}}},[b.viewport,F,f,p,Ce]),_.useEffect(()=>{l&&!b.isClosePausedRef.current&&Ce(F)},[l,F,b.isClosePausedRef,Ce]),_.useEffect(()=>(Y(),()=>ne()),[Y,ne]);const Se=_.useMemo(()=>x?iw(x):null,[x]);return b.viewport?T.jsxs(T.Fragment,{children:[Se&&T.jsx(AT,{__scopeToast:n,role:"status","aria-live":s==="foreground"?"assertive":"polite",children:Se}),T.jsx(kT,{scope:n,onClose:ve,children:Uf.createPortal(T.jsx(Wf.ItemSlot,{scope:n,children:T.jsx(aT,{asChild:!0,onEscapeKeyDown:Ht(d,()=>{b.isFocusedToastEscapeKeyDownRef.current||ve(),b.isFocusedToastEscapeKeyDownRef.current=!1}),children:T.jsx(In.li,{tabIndex:0,"data-state":l?"open":"closed","data-swipe-direction":b.swipeDirection,...R,ref:P,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Ht(t.onKeyDown,Z=>{Z.key==="Escape"&&(d==null||d(Z.nativeEvent),Z.nativeEvent.defaultPrevented||(b.isFocusedToastEscapeKeyDownRef.current=!0,ve()))}),onPointerDown:Ht(t.onPointerDown,Z=>{Z.button===0&&(k.current={x:Z.clientX,y:Z.clientY})}),onPointerMove:Ht(t.onPointerMove,Z=>{if(!k.current)return;const _e=Z.clientX-k.current.x,Te=Z.clientY-k.current.y,ce=!!A.current,Q=["left","right"].includes(b.swipeDirection),se=["left","up"].includes(b.swipeDirection)?Math.min:Math.max,z=Q?se(0,_e):0,L=Q?0:se(0,Te),$=Z.pointerType==="touch"?10:2,de={x:z,y:L},ge={originalEvent:Z,delta:de};ce?(A.current=de,wl(TT,y,ge,{discrete:!1})):Xg(de,b.swipeDirection,$)?(A.current=de,wl(ET,g,ge,{discrete:!1}),Z.target.setPointerCapture(Z.pointerId)):(Math.abs(_e)>$||Math.abs(Te)>$)&&(k.current=null)}),onPointerUp:Ht(t.onPointerUp,Z=>{const _e=A.current,Te=Z.target;if(Te.hasPointerCapture(Z.pointerId)&&Te.releasePointerCapture(Z.pointerId),A.current=null,k.current=null,_e){const ce=Z.currentTarget,Q={originalEvent:Z,delta:_e};Xg(_e,b.swipeDirection,b.swipeThreshold)?wl(CT,E,Q,{discrete:!0}):wl(_T,w,Q,{discrete:!0}),ce.addEventListener("click",se=>se.preventDefault(),{once:!0})}})})})}),b.viewport)})]}):null}),AT=t=>{const{__scopeToast:e,children:n,...s}=t,o=su(Yo,e),[l,u]=_.useState(!1),[d,f]=_.useState(!1);return DT(()=>u(!0)),_.useEffect(()=>{const p=window.setTimeout(()=>f(!0),1e3);return()=>window.clearTimeout(p)},[]),d?null:T.jsx(H0,{asChild:!0,children:T.jsx(zf,{...s,children:l&&T.jsxs(T.Fragment,{children:[o.label," ",n]})})})},OT="ToastTitle",Z0=_.forwardRef((t,e)=>{const{__scopeToast:n,...s}=t;return T.jsx(In.div,{...s,ref:e})});Z0.displayName=OT;var NT="ToastDescription",ew=_.forwardRef((t,e)=>{const{__scopeToast:n,...s}=t;return T.jsx(In.div,{...s,ref:e})});ew.displayName=NT;var tw="ToastAction",nw=_.forwardRef((t,e)=>{const{altText:n,...s}=t;return n.trim()?T.jsx(sw,{altText:n,asChild:!0,children:T.jsx(Hf,{...s,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${tw}\`. Expected non-empty \`string\`.`),null)});nw.displayName=tw;var rw="ToastClose",Hf=_.forwardRef((t,e)=>{const{__scopeToast:n,...s}=t,o=RT(rw,n);return T.jsx(sw,{asChild:!0,children:T.jsx(In.button,{type:"button",...s,ref:e,onClick:Ht(t.onClick,o.onClose)})})});Hf.displayName=rw;var sw=_.forwardRef((t,e)=>{const{__scopeToast:n,altText:s,...o}=t;return T.jsx(In.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":s||void 0,...o,ref:e})});function iw(t){const e=[];return Array.from(t.childNodes).forEach(s=>{if(s.nodeType===s.TEXT_NODE&&s.textContent&&e.push(s.textContent),LT(s)){const o=s.ariaHidden||s.hidden||s.style.display==="none",l=s.dataset.radixToastAnnounceExclude==="";if(!o)if(l){const u=s.dataset.radixToastAnnounceAlt;u&&e.push(u)}else e.push(...iw(s))}}),e}function wl(t,e,n,{discrete:s}){const o=n.originalEvent.currentTarget,l=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&o.addEventListener(t,e,{once:!0}),s?U0(o,l):o.dispatchEvent(l)}var Xg=(t,e,n=0)=>{const s=Math.abs(t.x),o=Math.abs(t.y),l=s>o;return e==="left"||e==="right"?l&&s>n:!l&&o>n};function DT(t=()=>{}){const e=_s(t);jo(()=>{let n=0,s=0;return n=window.requestAnimationFrame(()=>s=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(s)}},[e])}function LT(t){return t.nodeType===t.ELEMENT_NODE}function MT(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const o=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||o?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function pd(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var IT=Q0,ow=X0,aw=J0,lw=Z0,uw=ew,cw=nw,dw=Hf;function fw(t){var e,n,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;etypeof t=="boolean"?`${t}`:t===0?"0":t,Jg=hw,jT=(t,e)=>n=>{var s;if((e==null?void 0:e.variants)==null)return Jg(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:l}=e,u=Object.keys(o).map(p=>{const g=n==null?void 0:n[p],y=l==null?void 0:l[p];if(g===null)return null;const w=Yg(g)||Yg(y);return o[p][w]}),d=n&&Object.entries(n).reduce((p,g)=>{let[y,w]=g;return w===void 0||(p[y]=w),p},{}),f=e==null||(s=e.compoundVariants)===null||s===void 0?void 0:s.reduce((p,g)=>{let{class:y,className:w,...E}=g;return Object.entries(E).every(R=>{let[b,x]=R;return Array.isArray(x)?x.includes({...l,...d}[b]):{...l,...d}[b]===x})?[...p,y,w]:p},[]);return Jg(t,u,f,n==null?void 0:n.class,n==null?void 0:n.className)};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const FT=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),pw=(...t)=>t.filter((e,n,s)=>!!e&&e.trim()!==""&&s.indexOf(e)===n).join(" ").trim();/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var BT={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const UT=_.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:o="",children:l,iconNode:u,...d},f)=>_.createElement("svg",{ref:f,...BT,width:e,height:e,stroke:t,strokeWidth:s?Number(n)*24/Number(e):n,className:pw("lucide",o),...d},[...u.map(([p,g])=>_.createElement(p,g)),...Array.isArray(l)?l:[l]]));/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ur=(t,e)=>{const n=_.forwardRef(({className:s,...o},l)=>_.createElement(UT,{ref:l,iconNode:e,className:pw(`lucide-${FT(t)}`,s),...o}));return n.displayName=`${t}`,n};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const VT=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],zT=Ur("Layers",VT);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const $T=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],WT=Ur("Menu",$T);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const HT=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],qT=Ur("Network",HT);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const KT=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]],QT=Ur("Rows3",KT);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const GT=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],XT=Ur("ScrollText",GT);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const YT=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],JT=Ur("Star",YT);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ZT=[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]],e_=Ur("TrendingUp",ZT);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const t_=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],mw=Ur("X",t_),n_=(t,e)=>{const n=new Array(t.length+e.length);for(let s=0;s({classGroupId:t,validator:e}),gw=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),zl="-",Zg=[],s_="arbitrary..",i_=t=>{const e=a_(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=t;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return o_(u);const d=u.split(zl),f=d[0]===""&&d.length>1?1:0;return yw(d,f,e)},getConflictingClassGroupIds:(u,d)=>{if(d){const f=s[u],p=n[u];return f?p?n_(p,f):f:p||Zg}return n[u]||Zg}}},yw=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const o=t[e],l=n.nextPart.get(o);if(l){const p=yw(t,e+1,l);if(p)return p}const u=n.validators;if(u===null)return;const d=e===0?t.join(zl):t.slice(e).join(zl),f=u.length;for(let p=0;pt.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),s=e.slice(0,n);return s?s_+s:void 0})(),a_=t=>{const{theme:e,classGroups:n}=t;return l_(n,e)},l_=(t,e)=>{const n=gw();for(const s in t){const o=t[s];qf(o,n,s,e)}return n},qf=(t,e,n,s)=>{const o=t.length;for(let l=0;l{if(typeof t=="string"){c_(t,e,n);return}if(typeof t=="function"){d_(t,e,n,s);return}f_(t,e,n,s)},c_=(t,e,n)=>{const s=t===""?e:vw(e,t);s.classGroupId=n},d_=(t,e,n,s)=>{if(h_(t)){qf(t(s),e,n,s);return}e.validators===null&&(e.validators=[]),e.validators.push(r_(n,t))},f_=(t,e,n,s)=>{const o=Object.entries(t),l=o.length;for(let u=0;u{let n=t;const s=e.split(zl),o=s.length;for(let l=0;l"isThemeGetter"in t&&t.isThemeGetter===!0,p_=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),s=Object.create(null);const o=(l,u)=>{n[l]=u,e++,e>t&&(e=0,s=n,n=Object.create(null))};return{get(l){let u=n[l];if(u!==void 0)return u;if((u=s[l])!==void 0)return o(l,u),u},set(l,u){l in n?n[l]=u:o(l,u)}}},Hd="!",ey=":",m_=[],ty=(t,e,n,s,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:s,isExternal:o}),g_=t=>{const{prefix:e,experimentalParseClassName:n}=t;let s=o=>{const l=[];let u=0,d=0,f=0,p;const g=o.length;for(let b=0;bf?p-f:void 0;return ty(l,E,w,R)};if(e){const o=e+ey,l=s;s=u=>u.startsWith(o)?l(u.slice(o.length)):ty(m_,!1,u,void 0,!0)}if(n){const o=s;s=l=>n({className:l,parseClassName:o})}return s},y_=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,s)=>{e.set(n,1e6+s)}),n=>{const s=[];let o=[];for(let l=0;l0&&(o.sort(),s.push(...o),o=[]),s.push(u)):o.push(u)}return o.length>0&&(o.sort(),s.push(...o)),s}},v_=t=>({cache:p_(t.cacheSize),parseClassName:g_(t),sortModifiers:y_(t),...i_(t)}),w_=/\s+/,x_=(t,e)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:o,sortModifiers:l}=e,u=[],d=t.trim().split(w_);let f="";for(let p=d.length-1;p>=0;p-=1){const g=d[p],{isExternal:y,modifiers:w,hasImportantModifier:E,baseClassName:R,maybePostfixModifierPosition:b}=n(g);if(y){f=g+(f.length>0?" "+f:f);continue}let x=!!b,S=s(x?R.substring(0,b):R);if(!S){if(!x){f=g+(f.length>0?" "+f:f);continue}if(S=s(R),!S){f=g+(f.length>0?" "+f:f);continue}x=!1}const P=w.length===0?"":w.length===1?w[0]:l(w).join(":"),k=E?P+Hd:P,A=k+S;if(u.indexOf(A)>-1)continue;u.push(A);const F=o(S,x);for(let V=0;V0?" "+f:f)}return f},S_=(...t)=>{let e=0,n,s,o="";for(;e{if(typeof t=="string")return t;let e,n="";for(let s=0;s{let n,s,o,l;const u=f=>{const p=e.reduce((g,y)=>y(g),t());return n=v_(p),s=n.cache.get,o=n.cache.set,l=d,d(f)},d=f=>{const p=s(f);if(p)return p;const g=x_(f,n);return o(f,g),g};return l=u,(...f)=>l(S_(...f))},E_=[],st=t=>{const e=n=>n[t]||E_;return e.isThemeGetter=!0,e},xw=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Sw=/^\((?:(\w[\w-]*):)?(.+)\)$/i,T_=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,__=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,C_=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,k_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,R_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,P_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,br=t=>T_.test(t),ke=t=>!!t&&!Number.isNaN(Number(t)),Er=t=>!!t&&Number.isInteger(Number(t)),md=t=>t.endsWith("%")&&ke(t.slice(0,-1)),qn=t=>__.test(t),bw=()=>!0,A_=t=>C_.test(t)&&!k_.test(t),Kf=()=>!1,O_=t=>R_.test(t),N_=t=>P_.test(t),D_=t=>!oe(t)&&!ae(t),L_=t=>Vr(t,_w,Kf),oe=t=>xw.test(t),rs=t=>Vr(t,Cw,A_),ny=t=>Vr(t,z_,ke),M_=t=>Vr(t,Rw,bw),I_=t=>Vr(t,kw,Kf),ry=t=>Vr(t,Ew,Kf),j_=t=>Vr(t,Tw,N_),xl=t=>Vr(t,Pw,O_),ae=t=>Sw.test(t),yo=t=>Ps(t,Cw),F_=t=>Ps(t,kw),sy=t=>Ps(t,Ew),B_=t=>Ps(t,_w),U_=t=>Ps(t,Tw),Sl=t=>Ps(t,Pw,!0),V_=t=>Ps(t,Rw,!0),Vr=(t,e,n)=>{const s=xw.exec(t);return s?s[1]?e(s[1]):n(s[2]):!1},Ps=(t,e,n=!1)=>{const s=Sw.exec(t);return s?s[1]?e(s[1]):n:!1},Ew=t=>t==="position"||t==="percentage",Tw=t=>t==="image"||t==="url",_w=t=>t==="length"||t==="size"||t==="bg-size",Cw=t=>t==="length",z_=t=>t==="number",kw=t=>t==="family-name",Rw=t=>t==="number"||t==="weight",Pw=t=>t==="shadow",$_=()=>{const t=st("color"),e=st("font"),n=st("text"),s=st("font-weight"),o=st("tracking"),l=st("leading"),u=st("breakpoint"),d=st("container"),f=st("spacing"),p=st("radius"),g=st("shadow"),y=st("inset-shadow"),w=st("text-shadow"),E=st("drop-shadow"),R=st("blur"),b=st("perspective"),x=st("aspect"),S=st("ease"),P=st("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],F=()=>[...A(),ae,oe],V=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto","contain","none"],B=()=>[ae,oe,f],Y=()=>[br,"full","auto",...B()],ne=()=>[Er,"none","subgrid",ae,oe],ve=()=>["auto",{span:["full",Er,ae,oe]},Er,ae,oe],Ce=()=>[Er,"auto",ae,oe],Se=()=>["auto","min","max","fr",ae,oe],Z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],_e=()=>["start","end","center","stretch","center-safe","end-safe"],Te=()=>["auto",...B()],ce=()=>[br,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...B()],Q=()=>[br,"screen","full","dvw","lvw","svw","min","max","fit",...B()],se=()=>[br,"screen","full","lh","dvh","lvh","svh","min","max","fit",...B()],z=()=>[t,ae,oe],L=()=>[...A(),sy,ry,{position:[ae,oe]}],$=()=>["no-repeat",{repeat:["","x","y","space","round"]}],de=()=>["auto","cover","contain",B_,L_,{size:[ae,oe]}],ge=()=>[md,yo,rs],pe=()=>["","none","full",p,ae,oe],X=()=>["",ke,yo,rs],be=()=>["solid","dashed","dotted","double"],Pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],xe=()=>[ke,md,sy,ry],it=()=>["","none",R,ae,oe],Qt=()=>["none",ke,ae,oe],ct=()=>["none",ke,ae,oe],un=()=>[ke,ae,oe],Gt=()=>[br,"full",...B()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[qn],breakpoint:[qn],color:[bw],container:[qn],"drop-shadow":[qn],ease:["in","out","in-out"],font:[D_],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[qn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[qn],shadow:[qn],spacing:["px",ke],text:[qn],"text-shadow":[qn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",br,oe,ae,x]}],container:["container"],columns:[{columns:[ke,oe,ae,d]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:F()}],overflow:[{overflow:V()}],"overflow-x":[{"overflow-x":V()}],"overflow-y":[{"overflow-y":V()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Y()}],"inset-x":[{"inset-x":Y()}],"inset-y":[{"inset-y":Y()}],start:[{"inset-s":Y(),start:Y()}],end:[{"inset-e":Y(),end:Y()}],"inset-bs":[{"inset-bs":Y()}],"inset-be":[{"inset-be":Y()}],top:[{top:Y()}],right:[{right:Y()}],bottom:[{bottom:Y()}],left:[{left:Y()}],visibility:["visible","invisible","collapse"],z:[{z:[Er,"auto",ae,oe]}],basis:[{basis:[br,"full","auto",d,...B()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ke,br,"auto","initial","none",oe]}],grow:[{grow:["",ke,ae,oe]}],shrink:[{shrink:["",ke,ae,oe]}],order:[{order:[Er,"first","last","none",ae,oe]}],"grid-cols":[{"grid-cols":ne()}],"col-start-end":[{col:ve()}],"col-start":[{"col-start":Ce()}],"col-end":[{"col-end":Ce()}],"grid-rows":[{"grid-rows":ne()}],"row-start-end":[{row:ve()}],"row-start":[{"row-start":Ce()}],"row-end":[{"row-end":Ce()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Se()}],"auto-rows":[{"auto-rows":Se()}],gap:[{gap:B()}],"gap-x":[{"gap-x":B()}],"gap-y":[{"gap-y":B()}],"justify-content":[{justify:[...Z(),"normal"]}],"justify-items":[{"justify-items":[..._e(),"normal"]}],"justify-self":[{"justify-self":["auto",..._e()]}],"align-content":[{content:["normal",...Z()]}],"align-items":[{items:[..._e(),{baseline:["","last"]}]}],"align-self":[{self:["auto",..._e(),{baseline:["","last"]}]}],"place-content":[{"place-content":Z()}],"place-items":[{"place-items":[..._e(),"baseline"]}],"place-self":[{"place-self":["auto",..._e()]}],p:[{p:B()}],px:[{px:B()}],py:[{py:B()}],ps:[{ps:B()}],pe:[{pe:B()}],pbs:[{pbs:B()}],pbe:[{pbe:B()}],pt:[{pt:B()}],pr:[{pr:B()}],pb:[{pb:B()}],pl:[{pl:B()}],m:[{m:Te()}],mx:[{mx:Te()}],my:[{my:Te()}],ms:[{ms:Te()}],me:[{me:Te()}],mbs:[{mbs:Te()}],mbe:[{mbe:Te()}],mt:[{mt:Te()}],mr:[{mr:Te()}],mb:[{mb:Te()}],ml:[{ml:Te()}],"space-x":[{"space-x":B()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":B()}],"space-y-reverse":["space-y-reverse"],size:[{size:ce()}],"inline-size":[{inline:["auto",...Q()]}],"min-inline-size":[{"min-inline":["auto",...Q()]}],"max-inline-size":[{"max-inline":["none",...Q()]}],"block-size":[{block:["auto",...se()]}],"min-block-size":[{"min-block":["auto",...se()]}],"max-block-size":[{"max-block":["none",...se()]}],w:[{w:[d,"screen",...ce()]}],"min-w":[{"min-w":[d,"screen","none",...ce()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[u]},...ce()]}],h:[{h:["screen","lh",...ce()]}],"min-h":[{"min-h":["screen","lh","none",...ce()]}],"max-h":[{"max-h":["screen","lh",...ce()]}],"font-size":[{text:["base",n,yo,rs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,V_,M_]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",md,oe]}],"font-family":[{font:[F_,I_,e]}],"font-features":[{"font-features":[oe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ae,oe]}],"line-clamp":[{"line-clamp":[ke,"none",ae,ny]}],leading:[{leading:[l,...B()]}],"list-image":[{"list-image":["none",ae,oe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ae,oe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...be(),"wavy"]}],"text-decoration-thickness":[{decoration:[ke,"from-font","auto",ae,rs]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[ke,"auto",ae,oe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae,oe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ae,oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:$()}],"bg-size":[{bg:de()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Er,ae,oe],radial:["",ae,oe],conic:[Er,ae,oe]},U_,j_]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:ge()}],"gradient-via-pos":[{via:ge()}],"gradient-to-pos":[{to:ge()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:pe()}],"rounded-s":[{"rounded-s":pe()}],"rounded-e":[{"rounded-e":pe()}],"rounded-t":[{"rounded-t":pe()}],"rounded-r":[{"rounded-r":pe()}],"rounded-b":[{"rounded-b":pe()}],"rounded-l":[{"rounded-l":pe()}],"rounded-ss":[{"rounded-ss":pe()}],"rounded-se":[{"rounded-se":pe()}],"rounded-ee":[{"rounded-ee":pe()}],"rounded-es":[{"rounded-es":pe()}],"rounded-tl":[{"rounded-tl":pe()}],"rounded-tr":[{"rounded-tr":pe()}],"rounded-br":[{"rounded-br":pe()}],"rounded-bl":[{"rounded-bl":pe()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-bs":[{"border-bs":X()}],"border-w-be":[{"border-be":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...be(),"hidden","none"]}],"divide-style":[{divide:[...be(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-bs":[{"border-bs":z()}],"border-color-be":[{"border-be":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...be(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ke,ae,oe]}],"outline-w":[{outline:["",ke,yo,rs]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","none",g,Sl,xl]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",y,Sl,xl]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[ke,rs]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",w,Sl,xl]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[ke,ae,oe]}],"mix-blend":[{"mix-blend":[...Pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Pe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":xe()}],"mask-image-linear-to-pos":[{"mask-linear-to":xe()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":xe()}],"mask-image-t-to-pos":[{"mask-t-to":xe()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":xe()}],"mask-image-r-to-pos":[{"mask-r-to":xe()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":xe()}],"mask-image-b-to-pos":[{"mask-b-to":xe()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":xe()}],"mask-image-l-to-pos":[{"mask-l-to":xe()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":xe()}],"mask-image-x-to-pos":[{"mask-x-to":xe()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":xe()}],"mask-image-y-to-pos":[{"mask-y-to":xe()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[ae,oe]}],"mask-image-radial-from-pos":[{"mask-radial-from":xe()}],"mask-image-radial-to-pos":[{"mask-radial-to":xe()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":xe()}],"mask-image-conic-to-pos":[{"mask-conic-to":xe()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:$()}],"mask-size":[{mask:de()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ae,oe]}],filter:[{filter:["","none",ae,oe]}],blur:[{blur:it()}],brightness:[{brightness:[ke,ae,oe]}],contrast:[{contrast:[ke,ae,oe]}],"drop-shadow":[{"drop-shadow":["","none",E,Sl,xl]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",ke,ae,oe]}],"hue-rotate":[{"hue-rotate":[ke,ae,oe]}],invert:[{invert:["",ke,ae,oe]}],saturate:[{saturate:[ke,ae,oe]}],sepia:[{sepia:["",ke,ae,oe]}],"backdrop-filter":[{"backdrop-filter":["","none",ae,oe]}],"backdrop-blur":[{"backdrop-blur":it()}],"backdrop-brightness":[{"backdrop-brightness":[ke,ae,oe]}],"backdrop-contrast":[{"backdrop-contrast":[ke,ae,oe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ke,ae,oe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ke,ae,oe]}],"backdrop-invert":[{"backdrop-invert":["",ke,ae,oe]}],"backdrop-opacity":[{"backdrop-opacity":[ke,ae,oe]}],"backdrop-saturate":[{"backdrop-saturate":[ke,ae,oe]}],"backdrop-sepia":[{"backdrop-sepia":["",ke,ae,oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":B()}],"border-spacing-x":[{"border-spacing-x":B()}],"border-spacing-y":[{"border-spacing-y":B()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ae,oe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ke,"initial",ae,oe]}],ease:[{ease:["linear","initial",S,ae,oe]}],delay:[{delay:[ke,ae,oe]}],animate:[{animate:["none",P,ae,oe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,ae,oe]}],"perspective-origin":[{"perspective-origin":F()}],rotate:[{rotate:Qt()}],"rotate-x":[{"rotate-x":Qt()}],"rotate-y":[{"rotate-y":Qt()}],"rotate-z":[{"rotate-z":Qt()}],scale:[{scale:ct()}],"scale-x":[{"scale-x":ct()}],"scale-y":[{"scale-y":ct()}],"scale-z":[{"scale-z":ct()}],"scale-3d":["scale-3d"],skew:[{skew:un()}],"skew-x":[{"skew-x":un()}],"skew-y":[{"skew-y":un()}],transform:[{transform:[ae,oe,"","none","gpu","cpu"]}],"transform-origin":[{origin:F()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Gt()}],"translate-x":[{"translate-x":Gt()}],"translate-y":[{"translate-y":Gt()}],"translate-z":[{"translate-z":Gt()}],"translate-none":["translate-none"],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ae,oe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mbs":[{"scroll-mbs":B()}],"scroll-mbe":[{"scroll-mbe":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pbs":[{"scroll-pbs":B()}],"scroll-pbe":[{"scroll-pbe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ae,oe]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[ke,yo,rs,ny]}],stroke:[{stroke:["none",...z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},W_=b_($_);function zr(...t){return W_(hw(t))}const H_=IT,Aw=_.forwardRef(({className:t,...e},n)=>T.jsx(ow,{ref:n,className:zr("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...e}));Aw.displayName=ow.displayName;const q_=jT("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Ow=_.forwardRef(({className:t,variant:e,...n},s)=>T.jsx(aw,{ref:s,className:zr(q_({variant:e}),t),...n}));Ow.displayName=aw.displayName;const K_=_.forwardRef(({className:t,...e},n)=>T.jsx(cw,{ref:n,className:zr("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",t),...e}));K_.displayName=cw.displayName;const Nw=_.forwardRef(({className:t,...e},n)=>T.jsx(dw,{ref:n,className:zr("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...e,children:T.jsx(mw,{className:"h-4 w-4"})}));Nw.displayName=dw.displayName;const Dw=_.forwardRef(({className:t,...e},n)=>T.jsx(lw,{ref:n,className:zr("text-sm font-semibold",t),...e}));Dw.displayName=lw.displayName;const Lw=_.forwardRef(({className:t,...e},n)=>T.jsx(uw,{ref:n,className:zr("text-sm opacity-90",t),...e}));Lw.displayName=uw.displayName;function Q_(){const{toasts:t}=FE();return T.jsxs(H_,{children:[t.map(function({id:e,title:n,description:s,action:o,...l}){return T.jsxs(Ow,{...l,children:[T.jsxs("div",{className:"grid gap-1",children:[n&&T.jsx(Dw,{children:n}),s&&T.jsx(Lw,{children:s})]}),o,T.jsx(Nw,{})]},e)}),T.jsx(Aw,{})]})}var Jo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},G_={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},kr,jf,C0,X_=(C0=class{constructor(){me(this,kr,G_);me(this,jf,!1)}setTimeoutProvider(t){te(this,kr,t)}setTimeout(t,e){return N(this,kr).setTimeout(t,e)}clearTimeout(t){N(this,kr).clearTimeout(t)}setInterval(t,e){return N(this,kr).setInterval(t,e)}clearInterval(t){N(this,kr).clearInterval(t)}},kr=new WeakMap,jf=new WeakMap,C0),us=new X_;function Y_(t){setTimeout(t,0)}var Cs=typeof window>"u"||"Deno"in globalThis;function Ft(){}function J_(t,e){return typeof t=="function"?t(e):t}function qd(t){return typeof t=="number"&&t>=0&&t!==1/0}function Mw(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Ir(t,e){return typeof t=="function"?t(e):t}function an(t,e){return typeof t=="function"?t(e):t}function iy(t,e){const{type:n="all",exact:s,fetchStatus:o,predicate:l,queryKey:u,stale:d}=t;if(u){if(s){if(e.queryHash!==Qf(u,e.options))return!1}else if(!Bo(e.queryKey,u))return!1}if(n!=="all"){const f=e.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof d=="boolean"&&e.isStale()!==d||o&&o!==e.state.fetchStatus||l&&!l(e))}function oy(t,e){const{exact:n,status:s,predicate:o,mutationKey:l}=t;if(l){if(!e.options.mutationKey)return!1;if(n){if(Fo(e.options.mutationKey)!==Fo(l))return!1}else if(!Bo(e.options.mutationKey,l))return!1}return!(s&&e.state.status!==s||o&&!o(e))}function Qf(t,e){return((e==null?void 0:e.queryKeyHashFn)||Fo)(t)}function Fo(t){return JSON.stringify(t,(e,n)=>Qd(n)?Object.keys(n).sort().reduce((s,o)=>(s[o]=n[o],s),{}):n)}function Bo(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>Bo(t[n],e[n])):!1}var Z_=Object.prototype.hasOwnProperty;function Iw(t,e,n=0){if(t===e)return t;if(n>500)return e;const s=ay(t)&&ay(e);if(!s&&!(Qd(t)&&Qd(e)))return e;const l=(s?t:Object.keys(t)).length,u=s?e:Object.keys(e),d=u.length,f=s?new Array(d):{};let p=0;for(let g=0;g{us.setTimeout(e,t)})}function Gd(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?Iw(t,e):e}function tC(t,e,n=0){const s=[...t,e];return n&&s.length>n?s.slice(1):s}function nC(t,e,n=0){const s=[e,...t];return n&&s.length>n?s.slice(0,-1):s}var Gf=Symbol();function jw(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===Gf?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function Fw(t,e){return typeof t=="function"?t(...e):!!t}function rC(t,e,n){let s=!1,o;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(o??(o=e()),s||(s=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),t}var fs,Rr,ui,k0,sC=(k0=class extends Jo{constructor(){super();me(this,fs);me(this,Rr);me(this,ui);te(this,ui,e=>{if(!Cs&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){N(this,Rr)||this.setEventListener(N(this,ui))}onUnsubscribe(){var e;this.hasListeners()||((e=N(this,Rr))==null||e.call(this),te(this,Rr,void 0))}setEventListener(e){var n;te(this,ui,e),(n=N(this,Rr))==null||n.call(this),te(this,Rr,e(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(e){N(this,fs)!==e&&(te(this,fs,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof N(this,fs)=="boolean"?N(this,fs):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},fs=new WeakMap,Rr=new WeakMap,ui=new WeakMap,k0),Xf=new sC;function Xd(){let t,e;const n=new Promise((o,l)=>{t=o,e=l});n.status="pending",n.catch(()=>{});function s(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{s({status:"fulfilled",value:o}),t(o)},n.reject=o=>{s({status:"rejected",reason:o}),e(o)},n}var iC=Y_;function oC(){let t=[],e=0,n=d=>{d()},s=d=>{d()},o=iC;const l=d=>{e?t.push(d):o(()=>{n(d)})},u=()=>{const d=t;t=[],d.length&&o(()=>{s(()=>{d.forEach(f=>{n(f)})})})};return{batch:d=>{let f;e++;try{f=d()}finally{e--,e||u()}return f},batchCalls:d=>(...f)=>{l(()=>{d(...f)})},schedule:l,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{s=d},setScheduler:d=>{o=d}}}var gt=oC(),ci,Pr,di,R0,aC=(R0=class extends Jo{constructor(){super();me(this,ci,!0);me(this,Pr);me(this,di);te(this,di,e=>{if(!Cs&&window.addEventListener){const n=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",s)}}})}onSubscribe(){N(this,Pr)||this.setEventListener(N(this,di))}onUnsubscribe(){var e;this.hasListeners()||((e=N(this,Pr))==null||e.call(this),te(this,Pr,void 0))}setEventListener(e){var n;te(this,di,e),(n=N(this,Pr))==null||n.call(this),te(this,Pr,e(this.setOnline.bind(this)))}setOnline(e){N(this,ci)!==e&&(te(this,ci,e),this.listeners.forEach(s=>{s(e)}))}isOnline(){return N(this,ci)}},ci=new WeakMap,Pr=new WeakMap,di=new WeakMap,R0),$l=new aC;function lC(t){return Math.min(1e3*2**t,3e4)}function Bw(t){return(t??"online")==="online"?$l.isOnline():!0}var Yd=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function Uw(t){let e=!1,n=0,s;const o=Xd(),l=()=>o.status!=="pending",u=b=>{var x;if(!l()){const S=new Yd(b);w(S),(x=t.onCancel)==null||x.call(t,S)}},d=()=>{e=!0},f=()=>{e=!1},p=()=>Xf.isFocused()&&(t.networkMode==="always"||$l.isOnline())&&t.canRun(),g=()=>Bw(t.networkMode)&&t.canRun(),y=b=>{l()||(s==null||s(),o.resolve(b))},w=b=>{l()||(s==null||s(),o.reject(b))},E=()=>new Promise(b=>{var x;s=S=>{(l()||p())&&b(S)},(x=t.onPause)==null||x.call(t)}).then(()=>{var b;s=void 0,l()||(b=t.onContinue)==null||b.call(t)}),R=()=>{if(l())return;let b;const x=n===0?t.initialPromise:void 0;try{b=x??t.fn()}catch(S){b=Promise.reject(S)}Promise.resolve(b).then(y).catch(S=>{var V;if(l())return;const P=t.retry??(Cs?0:3),k=t.retryDelay??lC,A=typeof k=="function"?k(n,S):k,F=P===!0||typeof P=="number"&&np()?void 0:E()).then(()=>{e?w(S):R()})})};return{promise:o,status:()=>o.status,cancel:u,continue:()=>(s==null||s(),o),cancelRetry:d,continueRetry:f,canStart:g,start:()=>(g()?R():E().then(R),o)}}var hs,P0,Vw=(P0=class{constructor(){me(this,hs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),qd(this.gcTime)&&te(this,hs,us.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Cs?1/0:300*1e3))}clearGcTimeout(){N(this,hs)&&(us.clearTimeout(N(this,hs)),te(this,hs,void 0))}},hs=new WeakMap,P0),ps,fi,on,ms,ut,qo,gs,xn,Kn,A0,uC=(A0=class extends Vw{constructor(e){super();me(this,xn);me(this,ps);me(this,fi);me(this,on);me(this,ms);me(this,ut);me(this,qo);me(this,gs);te(this,gs,!1),te(this,qo,e.defaultOptions),this.setOptions(e.options),this.observers=[],te(this,ms,e.client),te(this,on,N(this,ms).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,te(this,ps,cy(this.options)),this.state=e.state??N(this,ps),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=N(this,ut))==null?void 0:e.promise}setOptions(e){if(this.options={...N(this,qo),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=cy(this.options);n.data!==void 0&&(this.setState(uy(n.data,n.dataUpdatedAt)),te(this,ps,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&N(this,on).remove(this)}setData(e,n){const s=Gd(this.state.data,e,this.options);return Ae(this,xn,Kn).call(this,{data:s,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),s}setState(e,n){Ae(this,xn,Kn).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var s,o;const n=(s=N(this,ut))==null?void 0:s.promise;return(o=N(this,ut))==null||o.cancel(e),n?n.then(Ft).catch(Ft):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(N(this,ps))}isActive(){return this.observers.some(e=>an(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Gf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Ir(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Mw(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(s=>s.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=N(this,ut))==null||n.continue()}onOnline(){var n;const e=this.observers.find(s=>s.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=N(this,ut))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),N(this,on).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(N(this,ut)&&(N(this,gs)?N(this,ut).cancel({revert:!0}):N(this,ut).cancelRetry()),this.scheduleGc()),N(this,on).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ae(this,xn,Kn).call(this,{type:"invalidate"})}async fetch(e,n){var f,p,g,y,w,E,R,b,x,S,P,k;if(this.state.fetchStatus!=="idle"&&((f=N(this,ut))==null?void 0:f.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(N(this,ut))return N(this,ut).continueRetry(),N(this,ut).promise}if(e&&this.setOptions(e),!this.options.queryFn){const A=this.observers.find(F=>F.options.queryFn);A&&this.setOptions(A.options)}const s=new AbortController,o=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(te(this,gs,!0),s.signal)})},l=()=>{const A=jw(this.options,n),V=(()=>{const q={client:N(this,ms),queryKey:this.queryKey,meta:this.meta};return o(q),q})();return te(this,gs,!1),this.options.persister?this.options.persister(A,V,this):A(V)},d=(()=>{const A={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:N(this,ms),state:this.state,fetchFn:l};return o(A),A})();(p=this.options.behavior)==null||p.onFetch(d,this),te(this,fi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=d.fetchOptions)==null?void 0:g.meta))&&Ae(this,xn,Kn).call(this,{type:"fetch",meta:(y=d.fetchOptions)==null?void 0:y.meta}),te(this,ut,Uw({initialPromise:n==null?void 0:n.initialPromise,fn:d.fetchFn,onCancel:A=>{A instanceof Yd&&A.revert&&this.setState({...N(this,fi),fetchStatus:"idle"}),s.abort()},onFail:(A,F)=>{Ae(this,xn,Kn).call(this,{type:"failed",failureCount:A,error:F})},onPause:()=>{Ae(this,xn,Kn).call(this,{type:"pause"})},onContinue:()=>{Ae(this,xn,Kn).call(this,{type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0}));try{const A=await N(this,ut).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(E=(w=N(this,on).config).onSuccess)==null||E.call(w,A,this),(b=(R=N(this,on).config).onSettled)==null||b.call(R,A,this.state.error,this),A}catch(A){if(A instanceof Yd){if(A.silent)return N(this,ut).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw Ae(this,xn,Kn).call(this,{type:"error",error:A}),(S=(x=N(this,on).config).onError)==null||S.call(x,A,this),(k=(P=N(this,on).config).onSettled)==null||k.call(P,this.state.data,A,this),A}finally{this.scheduleGc()}}},ps=new WeakMap,fi=new WeakMap,on=new WeakMap,ms=new WeakMap,ut=new WeakMap,qo=new WeakMap,gs=new WeakMap,xn=new WeakSet,Kn=function(e){const n=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...zw(s.data,this.options),fetchMeta:e.meta??null};case"success":const o={...s,...uy(e.data,e.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return te(this,fi,e.manual?o:void 0),o;case"error":const l=e.error;return{...s,error:l,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=n(this.state),gt.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),N(this,on).notify({query:this,type:"updated",action:e})})},A0);function zw(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Bw(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function uy(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function cy(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,s=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var jt,Oe,Ko,Pt,ys,hi,Gn,Ar,Qo,pi,mi,vs,ws,Or,gi,Ie,bo,Jd,Zd,ef,tf,nf,rf,sf,$w,O0,cC=(O0=class extends Jo{constructor(e,n){super();me(this,Ie);me(this,jt);me(this,Oe);me(this,Ko);me(this,Pt);me(this,ys);me(this,hi);me(this,Gn);me(this,Ar);me(this,Qo);me(this,pi);me(this,mi);me(this,vs);me(this,ws);me(this,Or);me(this,gi,new Set);this.options=n,te(this,jt,e),te(this,Ar,null),te(this,Gn,Xd()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(N(this,Oe).addObserver(this),dy(N(this,Oe),this.options)?Ae(this,Ie,bo).call(this):this.updateResult(),Ae(this,Ie,tf).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return of(N(this,Oe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return of(N(this,Oe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ae(this,Ie,nf).call(this),Ae(this,Ie,rf).call(this),N(this,Oe).removeObserver(this)}setOptions(e){const n=this.options,s=N(this,Oe);if(this.options=N(this,jt).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof an(this.options.enabled,N(this,Oe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ae(this,Ie,sf).call(this),N(this,Oe).setOptions(this.options),n._defaulted&&!Kd(this.options,n)&&N(this,jt).getQueryCache().notify({type:"observerOptionsUpdated",query:N(this,Oe),observer:this});const o=this.hasListeners();o&&fy(N(this,Oe),s,this.options,n)&&Ae(this,Ie,bo).call(this),this.updateResult(),o&&(N(this,Oe)!==s||an(this.options.enabled,N(this,Oe))!==an(n.enabled,N(this,Oe))||Ir(this.options.staleTime,N(this,Oe))!==Ir(n.staleTime,N(this,Oe)))&&Ae(this,Ie,Jd).call(this);const l=Ae(this,Ie,Zd).call(this);o&&(N(this,Oe)!==s||an(this.options.enabled,N(this,Oe))!==an(n.enabled,N(this,Oe))||l!==N(this,Or))&&Ae(this,Ie,ef).call(this,l)}getOptimisticResult(e){const n=N(this,jt).getQueryCache().build(N(this,jt),e),s=this.createResult(n,e);return fC(this,s)&&(te(this,Pt,s),te(this,hi,this.options),te(this,ys,N(this,Oe).state)),s}getCurrentResult(){return N(this,Pt)}trackResult(e,n){return new Proxy(e,{get:(s,o)=>(this.trackProp(o),n==null||n(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&N(this,Gn).status==="pending"&&N(this,Gn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,o))})}trackProp(e){N(this,gi).add(e)}getCurrentQuery(){return N(this,Oe)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=N(this,jt).defaultQueryOptions(e),s=N(this,jt).getQueryCache().build(N(this,jt),n);return s.fetch().then(()=>this.createResult(s,n))}fetch(e){return Ae(this,Ie,bo).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),N(this,Pt)))}createResult(e,n){var Y;const s=N(this,Oe),o=this.options,l=N(this,Pt),u=N(this,ys),d=N(this,hi),p=e!==s?e.state:N(this,Ko),{state:g}=e;let y={...g},w=!1,E;if(n._optimisticResults){const ne=this.hasListeners(),ve=!ne&&dy(e,n),Ce=ne&&fy(e,s,n,o);(ve||Ce)&&(y={...y,...zw(g.data,e.options)}),n._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:R,errorUpdatedAt:b,status:x}=y;E=y.data;let S=!1;if(n.placeholderData!==void 0&&E===void 0&&x==="pending"){let ne;l!=null&&l.isPlaceholderData&&n.placeholderData===(d==null?void 0:d.placeholderData)?(ne=l.data,S=!0):ne=typeof n.placeholderData=="function"?n.placeholderData((Y=N(this,mi))==null?void 0:Y.state.data,N(this,mi)):n.placeholderData,ne!==void 0&&(x="success",E=Gd(l==null?void 0:l.data,ne,n),w=!0)}if(n.select&&E!==void 0&&!S)if(l&&E===(u==null?void 0:u.data)&&n.select===N(this,Qo))E=N(this,pi);else try{te(this,Qo,n.select),E=n.select(E),E=Gd(l==null?void 0:l.data,E,n),te(this,pi,E),te(this,Ar,null)}catch(ne){te(this,Ar,ne)}N(this,Ar)&&(R=N(this,Ar),E=N(this,pi),b=Date.now(),x="error");const P=y.fetchStatus==="fetching",k=x==="pending",A=x==="error",F=k&&P,V=E!==void 0,B={status:x,fetchStatus:y.fetchStatus,isPending:k,isSuccess:x==="success",isError:A,isInitialLoading:F,isLoading:F,data:E,dataUpdatedAt:y.dataUpdatedAt,error:R,errorUpdatedAt:b,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:y.dataUpdateCount>0||y.errorUpdateCount>0,isFetchedAfterMount:y.dataUpdateCount>p.dataUpdateCount||y.errorUpdateCount>p.errorUpdateCount,isFetching:P,isRefetching:P&&!k,isLoadingError:A&&!V,isPaused:y.fetchStatus==="paused",isPlaceholderData:w,isRefetchError:A&&V,isStale:Yf(e,n),refetch:this.refetch,promise:N(this,Gn),isEnabled:an(n.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const ne=B.data!==void 0,ve=B.status==="error"&&!ne,Ce=_e=>{ve?_e.reject(B.error):ne&&_e.resolve(B.data)},Se=()=>{const _e=te(this,Gn,B.promise=Xd());Ce(_e)},Z=N(this,Gn);switch(Z.status){case"pending":e.queryHash===s.queryHash&&Ce(Z);break;case"fulfilled":(ve||B.data!==Z.value)&&Se();break;case"rejected":(!ve||B.error!==Z.reason)&&Se();break}}return B}updateResult(){const e=N(this,Pt),n=this.createResult(N(this,Oe),this.options);if(te(this,ys,N(this,Oe).state),te(this,hi,this.options),N(this,ys).data!==void 0&&te(this,mi,N(this,Oe)),Kd(n,e))return;te(this,Pt,n);const s=()=>{if(!e)return!0;const{notifyOnChangeProps:o}=this.options,l=typeof o=="function"?o():o;if(l==="all"||!l&&!N(this,gi).size)return!0;const u=new Set(l??N(this,gi));return this.options.throwOnError&&u.add("error"),Object.keys(N(this,Pt)).some(d=>{const f=d;return N(this,Pt)[f]!==e[f]&&u.has(f)})};Ae(this,Ie,$w).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ae(this,Ie,tf).call(this)}},jt=new WeakMap,Oe=new WeakMap,Ko=new WeakMap,Pt=new WeakMap,ys=new WeakMap,hi=new WeakMap,Gn=new WeakMap,Ar=new WeakMap,Qo=new WeakMap,pi=new WeakMap,mi=new WeakMap,vs=new WeakMap,ws=new WeakMap,Or=new WeakMap,gi=new WeakMap,Ie=new WeakSet,bo=function(e){Ae(this,Ie,sf).call(this);let n=N(this,Oe).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(Ft)),n},Jd=function(){Ae(this,Ie,nf).call(this);const e=Ir(this.options.staleTime,N(this,Oe));if(Cs||N(this,Pt).isStale||!qd(e))return;const s=Mw(N(this,Pt).dataUpdatedAt,e)+1;te(this,vs,us.setTimeout(()=>{N(this,Pt).isStale||this.updateResult()},s))},Zd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(N(this,Oe)):this.options.refetchInterval)??!1},ef=function(e){Ae(this,Ie,rf).call(this),te(this,Or,e),!(Cs||an(this.options.enabled,N(this,Oe))===!1||!qd(N(this,Or))||N(this,Or)===0)&&te(this,ws,us.setInterval(()=>{(this.options.refetchIntervalInBackground||Xf.isFocused())&&Ae(this,Ie,bo).call(this)},N(this,Or)))},tf=function(){Ae(this,Ie,Jd).call(this),Ae(this,Ie,ef).call(this,Ae(this,Ie,Zd).call(this))},nf=function(){N(this,vs)&&(us.clearTimeout(N(this,vs)),te(this,vs,void 0))},rf=function(){N(this,ws)&&(us.clearInterval(N(this,ws)),te(this,ws,void 0))},sf=function(){const e=N(this,jt).getQueryCache().build(N(this,jt),this.options);if(e===N(this,Oe))return;const n=N(this,Oe);te(this,Oe,e),te(this,Ko,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},$w=function(e){gt.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(N(this,Pt))}),N(this,jt).getQueryCache().notify({query:N(this,Oe),type:"observerResultsUpdated"})})},O0);function dC(t,e){return an(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function dy(t,e){return dC(t,e)||t.state.data!==void 0&&of(t,e,e.refetchOnMount)}function of(t,e,n){if(an(e.enabled,t)!==!1&&Ir(e.staleTime,t)!=="static"){const s=typeof n=="function"?n(t):n;return s==="always"||s!==!1&&Yf(t,e)}return!1}function fy(t,e,n,s){return(t!==e||an(s.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&Yf(t,n)}function Yf(t,e){return an(e.enabled,t)!==!1&&t.isStaleByTime(Ir(e.staleTime,t))}function fC(t,e){return!Kd(t.getCurrentResult(),e)}function hy(t){return{onFetch:(e,n)=>{var g,y,w,E,R;const s=e.options,o=(w=(y=(g=e.fetchOptions)==null?void 0:g.meta)==null?void 0:y.fetchMore)==null?void 0:w.direction,l=((E=e.state.data)==null?void 0:E.pages)||[],u=((R=e.state.data)==null?void 0:R.pageParams)||[];let d={pages:[],pageParams:[]},f=0;const p=async()=>{let b=!1;const x=k=>{rC(k,()=>e.signal,()=>b=!0)},S=jw(e.options,e.fetchOptions),P=async(k,A,F)=>{if(b)return Promise.reject();if(A==null&&k.pages.length)return Promise.resolve(k);const q=(()=>{const ve={client:e.client,queryKey:e.queryKey,pageParam:A,direction:F?"backward":"forward",meta:e.options.meta};return x(ve),ve})(),B=await S(q),{maxPages:Y}=e.options,ne=F?nC:tC;return{pages:ne(k.pages,B,Y),pageParams:ne(k.pageParams,A,Y)}};if(o&&l.length){const k=o==="backward",A=k?hC:py,F={pages:l,pageParams:u},V=A(s,F);d=await P(F,V,k)}else{const k=t??l.length;do{const A=f===0?u[0]??s.initialPageParam:py(s,d);if(f>0&&A==null)break;d=await P(d,A),f++}while(f{var b,x;return(x=(b=e.options).persister)==null?void 0:x.call(b,p,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=p}}}function py(t,{pages:e,pageParams:n}){const s=e.length-1;return e.length>0?t.getNextPageParam(e[s],e,n[s],n):void 0}function hC(t,{pages:e,pageParams:n}){var s;return e.length>0?(s=t.getPreviousPageParam)==null?void 0:s.call(t,e[0],e,n[0],n):void 0}var Go,Pn,Et,xs,An,_r,N0,pC=(N0=class extends Vw{constructor(e){super();me(this,An);me(this,Go);me(this,Pn);me(this,Et);me(this,xs);te(this,Go,e.client),this.mutationId=e.mutationId,te(this,Et,e.mutationCache),te(this,Pn,[]),this.state=e.state||mC(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){N(this,Pn).includes(e)||(N(this,Pn).push(e),this.clearGcTimeout(),N(this,Et).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){te(this,Pn,N(this,Pn).filter(n=>n!==e)),this.scheduleGc(),N(this,Et).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){N(this,Pn).length||(this.state.status==="pending"?this.scheduleGc():N(this,Et).remove(this))}continue(){var e;return((e=N(this,xs))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var u,d,f,p,g,y,w,E,R,b,x,S,P,k,A,F,V,q;const n=()=>{Ae(this,An,_r).call(this,{type:"continue"})},s={client:N(this,Go),meta:this.options.meta,mutationKey:this.options.mutationKey};te(this,xs,Uw({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(new Error("No mutationFn found")),onFail:(B,Y)=>{Ae(this,An,_r).call(this,{type:"failed",failureCount:B,error:Y})},onPause:()=>{Ae(this,An,_r).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>N(this,Et).canRun(this)}));const o=this.state.status==="pending",l=!N(this,xs).canStart();try{if(o)n();else{Ae(this,An,_r).call(this,{type:"pending",variables:e,isPaused:l}),N(this,Et).config.onMutate&&await N(this,Et).config.onMutate(e,this,s);const Y=await((d=(u=this.options).onMutate)==null?void 0:d.call(u,e,s));Y!==this.state.context&&Ae(this,An,_r).call(this,{type:"pending",context:Y,variables:e,isPaused:l})}const B=await N(this,xs).start();return await((p=(f=N(this,Et).config).onSuccess)==null?void 0:p.call(f,B,e,this.state.context,this,s)),await((y=(g=this.options).onSuccess)==null?void 0:y.call(g,B,e,this.state.context,s)),await((E=(w=N(this,Et).config).onSettled)==null?void 0:E.call(w,B,null,this.state.variables,this.state.context,this,s)),await((b=(R=this.options).onSettled)==null?void 0:b.call(R,B,null,e,this.state.context,s)),Ae(this,An,_r).call(this,{type:"success",data:B}),B}catch(B){try{await((S=(x=N(this,Et).config).onError)==null?void 0:S.call(x,B,e,this.state.context,this,s))}catch(Y){Promise.reject(Y)}try{await((k=(P=this.options).onError)==null?void 0:k.call(P,B,e,this.state.context,s))}catch(Y){Promise.reject(Y)}try{await((F=(A=N(this,Et).config).onSettled)==null?void 0:F.call(A,void 0,B,this.state.variables,this.state.context,this,s))}catch(Y){Promise.reject(Y)}try{await((q=(V=this.options).onSettled)==null?void 0:q.call(V,void 0,B,e,this.state.context,s))}catch(Y){Promise.reject(Y)}throw Ae(this,An,_r).call(this,{type:"error",error:B}),B}finally{N(this,Et).runNext(this)}}},Go=new WeakMap,Pn=new WeakMap,Et=new WeakMap,xs=new WeakMap,An=new WeakSet,_r=function(e){const n=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),gt.batch(()=>{N(this,Pn).forEach(s=>{s.onMutationUpdate(e)}),N(this,Et).notify({mutation:this,type:"updated",action:e})})},N0);function mC(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Xn,Sn,Xo,D0,gC=(D0=class extends Jo{constructor(e={}){super();me(this,Xn);me(this,Sn);me(this,Xo);this.config=e,te(this,Xn,new Set),te(this,Sn,new Map),te(this,Xo,0)}build(e,n,s){const o=new pC({client:e,mutationCache:this,mutationId:++gl(this,Xo)._,options:e.defaultMutationOptions(n),state:s});return this.add(o),o}add(e){N(this,Xn).add(e);const n=bl(e);if(typeof n=="string"){const s=N(this,Sn).get(n);s?s.push(e):N(this,Sn).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(N(this,Xn).delete(e)){const n=bl(e);if(typeof n=="string"){const s=N(this,Sn).get(n);if(s)if(s.length>1){const o=s.indexOf(e);o!==-1&&s.splice(o,1)}else s[0]===e&&N(this,Sn).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=bl(e);if(typeof n=="string"){const s=N(this,Sn).get(n),o=s==null?void 0:s.find(l=>l.state.status==="pending");return!o||o===e}else return!0}runNext(e){var s;const n=bl(e);if(typeof n=="string"){const o=(s=N(this,Sn).get(n))==null?void 0:s.find(l=>l!==e&&l.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){gt.batch(()=>{N(this,Xn).forEach(e=>{this.notify({type:"removed",mutation:e})}),N(this,Xn).clear(),N(this,Sn).clear()})}getAll(){return Array.from(N(this,Xn))}find(e){const n={exact:!0,...e};return this.getAll().find(s=>oy(n,s))}findAll(e={}){return this.getAll().filter(n=>oy(e,n))}notify(e){gt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return gt.batch(()=>Promise.all(e.map(n=>n.continue().catch(Ft))))}},Xn=new WeakMap,Sn=new WeakMap,Xo=new WeakMap,D0);function bl(t){var e;return(e=t.options.scope)==null?void 0:e.id}var On,L0,yC=(L0=class extends Jo{constructor(e={}){super();me(this,On);this.config=e,te(this,On,new Map)}build(e,n,s){const o=n.queryKey,l=n.queryHash??Qf(o,n);let u=this.get(l);return u||(u=new uC({client:e,queryKey:o,queryHash:l,options:e.defaultQueryOptions(n),state:s,defaultOptions:e.getQueryDefaults(o)}),this.add(u)),u}add(e){N(this,On).has(e.queryHash)||(N(this,On).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=N(this,On).get(e.queryHash);n&&(e.destroy(),n===e&&N(this,On).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){gt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return N(this,On).get(e)}getAll(){return[...N(this,On).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(s=>iy(n,s))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(s=>iy(e,s)):n}notify(e){gt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){gt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){gt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},On=new WeakMap,L0),Qe,Nr,Dr,yi,vi,Lr,wi,xi,M0,vC=(M0=class{constructor(t={}){me(this,Qe);me(this,Nr);me(this,Dr);me(this,yi);me(this,vi);me(this,Lr);me(this,wi);me(this,xi);te(this,Qe,t.queryCache||new yC),te(this,Nr,t.mutationCache||new gC),te(this,Dr,t.defaultOptions||{}),te(this,yi,new Map),te(this,vi,new Map),te(this,Lr,0)}mount(){gl(this,Lr)._++,N(this,Lr)===1&&(te(this,wi,Xf.subscribe(async t=>{t&&(await this.resumePausedMutations(),N(this,Qe).onFocus())})),te(this,xi,$l.subscribe(async t=>{t&&(await this.resumePausedMutations(),N(this,Qe).onOnline())})))}unmount(){var t,e;gl(this,Lr)._--,N(this,Lr)===0&&((t=N(this,wi))==null||t.call(this),te(this,wi,void 0),(e=N(this,xi))==null||e.call(this),te(this,xi,void 0))}isFetching(t){return N(this,Qe).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return N(this,Nr).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=N(this,Qe).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=N(this,Qe).build(this,e),s=n.state.data;return s===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(Ir(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(s))}getQueriesData(t){return N(this,Qe).findAll(t).map(({queryKey:e,state:n})=>{const s=n.data;return[e,s]})}setQueryData(t,e,n){const s=this.defaultQueryOptions({queryKey:t}),o=N(this,Qe).get(s.queryHash),l=o==null?void 0:o.state.data,u=J_(e,l);if(u!==void 0)return N(this,Qe).build(this,s).setData(u,{...n,manual:!0})}setQueriesData(t,e,n){return gt.batch(()=>N(this,Qe).findAll(t).map(({queryKey:s})=>[s,this.setQueryData(s,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=N(this,Qe).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=N(this,Qe);gt.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=N(this,Qe);return gt.batch(()=>(n.findAll(t).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},s=gt.batch(()=>N(this,Qe).findAll(t).map(o=>o.cancel(n)));return Promise.all(s).then(Ft).catch(Ft)}invalidateQueries(t,e={}){return gt.batch(()=>(N(this,Qe).findAll(t).forEach(n=>{n.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},s=gt.batch(()=>N(this,Qe).findAll(t).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let l=o.fetch(void 0,n);return n.throwOnError||(l=l.catch(Ft)),o.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(s).then(Ft)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=N(this,Qe).build(this,e);return n.isStaleByTime(Ir(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Ft).catch(Ft)}fetchInfiniteQuery(t){return t.behavior=hy(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Ft).catch(Ft)}ensureInfiniteQueryData(t){return t.behavior=hy(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return $l.isOnline()?N(this,Nr).resumePausedMutations():Promise.resolve()}getQueryCache(){return N(this,Qe)}getMutationCache(){return N(this,Nr)}getDefaultOptions(){return N(this,Dr)}setDefaultOptions(t){te(this,Dr,t)}setQueryDefaults(t,e){N(this,yi).set(Fo(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...N(this,yi).values()],n={};return e.forEach(s=>{Bo(t,s.queryKey)&&Object.assign(n,s.defaultOptions)}),n}setMutationDefaults(t,e){N(this,vi).set(Fo(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...N(this,vi).values()],n={};return e.forEach(s=>{Bo(t,s.mutationKey)&&Object.assign(n,s.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...N(this,Dr).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Qf(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Gf&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...N(this,Dr).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){N(this,Qe).clear(),N(this,Nr).clear()}},Qe=new WeakMap,Nr=new WeakMap,Dr=new WeakMap,yi=new WeakMap,vi=new WeakMap,Lr=new WeakMap,wi=new WeakMap,xi=new WeakMap,M0),Ww=_.createContext(void 0),wC=t=>{const e=_.useContext(Ww);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},xC=({client:t,children:e})=>(_.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),T.jsx(Ww.Provider,{value:t,children:e})),Hw=_.createContext(!1),SC=()=>_.useContext(Hw);Hw.Provider;function bC(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var EC=_.createContext(bC()),TC=()=>_.useContext(EC),_C=(t,e,n)=>{const s=n!=null&&n.state.error&&typeof t.throwOnError=="function"?Fw(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||s)&&(e.isReset()||(t.retryOnMount=!1))},CC=t=>{_.useEffect(()=>{t.clearReset()},[t])},kC=({result:t,errorResetBoundary:e,throwOnError:n,query:s,suspense:o})=>t.isError&&!e.isReset()&&!t.isFetching&&s&&(o&&t.data===void 0||Fw(n,[t.error,s])),RC=t=>{if(t.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),s=t.staleTime;t.staleTime=typeof s=="function"?(...o)=>n(s(...o)):n(s),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},PC=(t,e)=>t.isLoading&&t.isFetching&&!e,AC=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,my=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function OC(t,e,n){var w,E,R,b;const s=SC(),o=TC(),l=wC(),u=l.defaultQueryOptions(t);(E=(w=l.getDefaultOptions().queries)==null?void 0:w._experimental_beforeQuery)==null||E.call(w,u);const d=l.getQueryCache().get(u.queryHash);u._optimisticResults=s?"isRestoring":"optimistic",RC(u),_C(u,o,d),CC(o);const f=!l.getQueryCache().get(u.queryHash),[p]=_.useState(()=>new e(l,u)),g=p.getOptimisticResult(u),y=!s&&t.subscribed!==!1;if(_.useSyncExternalStore(_.useCallback(x=>{const S=y?p.subscribe(gt.batchCalls(x)):Ft;return p.updateResult(),S},[p,y]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),_.useEffect(()=>{p.setOptions(u)},[u,p]),AC(u,g))throw my(u,p,o);if(kC({result:g,errorResetBoundary:o,throwOnError:u.throwOnError,query:d,suspense:u.suspense}))throw g.error;if((b=(R=l.getDefaultOptions().queries)==null?void 0:R._experimental_afterQuery)==null||b.call(R,u,g),u.experimental_prefetchInRender&&!Cs&&PC(g,s)){const x=f?my(u,p,o):d==null?void 0:d.promise;x==null||x.catch(Ft).finally(()=>{p.updateResult()})}return u.notifyOnChangeProps?g:p.trackResult(g)}function NC(t,e){return OC(t,cC)}const DC=new vC({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});/** * @remix-run/router v1.23.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Wl(){return Wl=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function qw(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function MC(){return Math.random().toString(36).substr(2,8)}function yy(t,e){return{usr:t.state,key:t.key,idx:e}}function af(t,e,n,s){return n===void 0&&(n=null),Wl({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?iu(e):e,{state:n,key:e&&e.key||s||MC()})}function Kw(t){let{pathname:e="/",search:n="",hash:s=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),s&&s!=="#"&&(e+=s.charAt(0)==="#"?s:"#"+s),e}function iu(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let s=t.indexOf("?");s>=0&&(e.search=t.substr(s),t=t.substr(0,s)),t&&(e.pathname=t)}return e}function IC(t,e,n,s){s===void 0&&(s={});let{window:o=document.defaultView,v5Compat:l=!1}=s,u=o.history,d=Mr.Pop,f=null,p=g();p==null&&(p=0,u.replaceState(Wl({},u.state,{idx:p}),""));function g(){return(u.state||{idx:null}).idx}function y(){d=Mr.Pop;let x=g(),S=x==null?null:x-p;p=x,f&&f({action:d,location:b.location,delta:S})}function w(x,S){d=Mr.Push;let P=af(b.location,x,S);p=g()+1;let k=yy(P,p),A=b.createHref(P);try{u.pushState(k,"",A)}catch(F){if(F instanceof DOMException&&F.name==="DataCloneError")throw F;o.location.assign(A)}l&&f&&f({action:d,location:b.location,delta:1})}function E(x,S){d=Mr.Replace;let P=af(b.location,x,S);p=g();let k=yy(P,p),A=b.createHref(P);u.replaceState(k,"",A),l&&f&&f({action:d,location:b.location,delta:0})}function R(x){let S=o.location.origin!=="null"?o.location.origin:o.location.href,P=typeof x=="string"?x:Kw(x);return P=P.replace(/ $/,"%20"),Ut(S,"No window.location.(origin|href) available to create URL for href: "+P),new URL(P,S)}let b={get action(){return d},get location(){return t(o,u)},listen(x){if(f)throw new Error("A history only accepts one active listener");return o.addEventListener(gy,y),f=x,()=>{o.removeEventListener(gy,y),f=null}},createHref(x){return e(o,x)},createURL:R,encodeLocation(x){let S=R(x);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:w,replace:E,go(x){return u.go(x)}};return b}var vy;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(vy||(vy={}));function jC(t,e,n){return n===void 0&&(n="/"),FC(t,e,n)}function FC(t,e,n,s){let o=typeof e=="string"?iu(e):e,l=Xw(o.pathname||"/",n);if(l==null)return null;let u=Qw(t);BC(u);let d=null,f=YC(l);for(let p=0;d==null&&p{let f={relativePath:d===void 0?l.path||"":d,caseSensitive:l.caseSensitive===!0,childrenIndex:u,route:l};f.relativePath.startsWith("/")&&(Ut(f.relativePath.startsWith(s),'Absolute route path "'+f.relativePath+'" nested under path '+('"'+s+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),f.relativePath=f.relativePath.slice(s.length));let p=li([s,f.relativePath]),g=n.concat(f);l.children&&l.children.length>0&&(Ut(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+p+'".')),Qw(l.children,e,g,p)),!(l.path==null&&!l.index)&&e.push({path:p,score:qC(p,l.index),routesMeta:g})};return t.forEach((l,u)=>{var d;if(l.path===""||!((d=l.path)!=null&&d.includes("?")))o(l,u);else for(let f of Gw(l.path))o(l,u,f)}),e}function Gw(t){let e=t.split("/");if(e.length===0)return[];let[n,...s]=e,o=n.endsWith("?"),l=n.replace(/\?$/,"");if(s.length===0)return o?[l,""]:[l];let u=Gw(s.join("/")),d=[];return d.push(...u.map(f=>f===""?l:[l,f].join("/"))),o&&d.push(...u),d.map(f=>t.startsWith("/")&&f===""?"/":f)}function BC(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:KC(e.routesMeta.map(s=>s.childrenIndex),n.routesMeta.map(s=>s.childrenIndex)))}const UC=/^:[\w-]+$/,VC=3,zC=2,$C=1,WC=10,HC=-2,wy=t=>t==="*";function qC(t,e){let n=t.split("/"),s=n.length;return n.some(wy)&&(s+=HC),e&&(s+=zC),n.filter(o=>!wy(o)).reduce((o,l)=>o+(UC.test(l)?VC:l===""?$C:WC),s)}function KC(t,e){return t.length===e.length&&t.slice(0,-1).every((s,o)=>s===e[o])?t[t.length-1]-e[e.length-1]:0}function QC(t,e,n){let{routesMeta:s}=t,o={},l="/",u=[];for(let d=0;d{let{paramName:w,isOptional:E}=g;if(w==="*"){let b=d[y]||"";u=l.slice(0,l.length-b.length).replace(/(.)\/+$/,"$1")}const R=d[y];return E&&!R?p[w]=void 0:p[w]=(R||"").replace(/%2F/g,"/"),p},{}),pathname:l,pathnameBase:u,pattern:t}}function XC(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),qw(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let s=[],o="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,d,f)=>(s.push({paramName:d,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(s.push({paramName:"*"}),o+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":t!==""&&t!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,e?void 0:"i"),s]}function YC(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return qw(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Xw(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,s=t.charAt(n);return s&&s!=="/"?null:t.slice(n)||"/"}const JC=t=>t.replace(/\/\/+/g,"/"),li=t=>JC(t.join("/")),ZC=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/");function ek(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const Yw=["post","put","patch","delete"];new Set(Yw);const tk=["get",...Yw];new Set(tk);/** * React Router v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Hl(){return Hl=Object.assign?Object.assign.bind():function(t){for(var e=1;eObject.assign({},x,{params:Object.assign({},d,x.params),pathname:li([f,o.encodeLocation?o.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?f:li([f,o.encodeLocation?o.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),l,n,s);return e&&b?_.createElement(Zo.Provider,{value:{location:Hl({pathname:"/",search:"",hash:"",state:null,key:"default"},g),navigationType:Mr.Pop}},b):b}function ak(){let t=mk(),e=ek(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return _.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},e),n?_.createElement("pre",{style:o},n):null,null)}const lk=_.createElement(ak,null);class uk extends _.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?_.createElement(ou.Provider,{value:this.props.routeContext},_.createElement(Zw.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ck(t){let{routeContext:e,match:n,children:s}=t,o=_.useContext(nk);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),_.createElement(ou.Provider,{value:e},s)}function dk(t,e,n,s){var o;if(e===void 0&&(e=[]),n===void 0&&(n=null),s===void 0&&(s=null),t==null){var l;if(!n)return null;if(n.errors)t=n.matches;else if((l=s)!=null&&l.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let u=t,d=(o=n)==null?void 0:o.errors;if(d!=null){let g=u.findIndex(y=>y.route.id&&(d==null?void 0:d[y.route.id])!==void 0);g>=0||Ut(!1),u=u.slice(0,Math.min(u.length,g+1))}let f=!1,p=-1;if(n&&s&&s.v7_partialHydration)for(let g=0;g=0?u=u.slice(0,p+1):u=[u[0]];break}}}return u.reduceRight((g,y,w)=>{let E,R=!1,b=null,x=null;n&&(E=d&&y.route.id?d[y.route.id]:void 0,b=y.route.errorElement||lk,f&&(p<0&&w===0?(gk("route-fallback"),R=!0,x=null):p===w&&(R=!0,x=y.route.hydrateFallbackElement||null)));let S=e.concat(u.slice(0,w+1)),P=()=>{let k;return E?k=b:R?k=x:y.route.Component?k=_.createElement(y.route.Component,null):y.route.element?k=y.route.element:k=g,_.createElement(ck,{match:y,routeContext:{outlet:g,matches:S,isDataRoute:n!=null},children:k})};return n&&(y.route.ErrorBoundary||y.route.errorElement||w===0)?_.createElement(uk,{location:n.location,revalidation:n.revalidation,component:b,error:E,children:P(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):P()},null)}var ex=(function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t})(ex||{});function fk(t){let e=_.useContext(rk);return e||Ut(!1),e}function hk(t){let e=_.useContext(ou);return e||Ut(!1),e}function pk(t){let e=hk(),n=e.matches[e.matches.length-1];return n.route.id||Ut(!1),n.route.id}function mk(){var t;let e=_.useContext(Zw),n=fk(ex.UseRouteError),s=pk();return e!==void 0?e:(t=n.errors)==null?void 0:t[s]}const xy={};function gk(t,e,n){xy[t]||(xy[t]=!0)}function yk(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function lf(t){Ut(!1)}function vk(t){let{basename:e="/",children:n=null,location:s,navigationType:o=Mr.Pop,navigator:l,static:u=!1,future:d}=t;Jf()&&Ut(!1);let f=e.replace(/^\/*/,"/"),p=_.useMemo(()=>({basename:f,navigator:l,static:u,future:Hl({v7_relativeSplatPath:!1},d)}),[f,d,l,u]);typeof s=="string"&&(s=iu(s));let{pathname:g="/",search:y="",hash:w="",state:E=null,key:R="default"}=s,b=_.useMemo(()=>{let x=Xw(g,f);return x==null?null:{location:{pathname:x,search:y,hash:w,state:E,key:R},navigationType:o}},[f,g,y,w,E,R,o]);return b==null?null:_.createElement(Jw.Provider,{value:p},_.createElement(Zo.Provider,{children:n,value:b}))}function wk(t){let{children:e,location:n}=t;return ik(uf(e),n)}new Promise(()=>{});function uf(t,e){e===void 0&&(e=[]);let n=[];return _.Children.forEach(t,(s,o)=>{if(!_.isValidElement(s))return;let l=[...e,o];if(s.type===_.Fragment){n.push.apply(n,uf(s.props.children,l));return}s.type!==lf&&Ut(!1),!s.props.index||!s.props.children||Ut(!1);let u={id:s.props.id||l.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,loader:s.props.loader,action:s.props.action,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(u.children=uf(s.props.children,l)),n.push(u)}),n}/** * React Router DOM v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */const xk="6";try{window.__reactRouterVersion=xk}catch{}const Sk="startTransition",Sy=j0[Sk];function bk(t){let{basename:e,children:n,future:s,window:o}=t,l=_.useRef();l.current==null&&(l.current=LC({window:o,v5Compat:!0}));let u=l.current,[d,f]=_.useState({action:u.action,location:u.location}),{v7_startTransition:p}=s||{},g=_.useCallback(y=>{p&&Sy?Sy(()=>f(y)):f(y)},[f,p]);return _.useLayoutEffect(()=>u.listen(g),[u,g]),_.useEffect(()=>yk(s),[s]),_.createElement(vk,{basename:e,children:n,location:d.location,navigationType:d.action,navigator:u,future:s})}var by;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(by||(by={}));var Ey;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Ey||(Ey={}));function tx(t,e){return function(){return t.apply(e,arguments)}}const{toString:Ek}=Object.prototype,{getPrototypeOf:Si}=Object,{iterator:ea,toStringTag:nx}=Symbol,ql=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Uo=(t,e)=>{let n=t;const s=[];for(;n!=null&&n!==Object.prototype;){if(s.indexOf(n)!==-1)return!1;if(s.push(n),ql(n,e))return!0;n=Si(n)}return!1},Tk=(t,e)=>t!=null&&Uo(t,e)?t[e]:void 0,eh=(t=>e=>{const n=Ek.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),En=t=>(t=t.toLowerCase(),e=>eh(e)===t),au=t=>e=>typeof e===t,{isArray:ks}=Array,bi=au("undefined");function Ci(t){return t!==null&&!bi(t)&&t.constructor!==null&&!bi(t.constructor)&&Bt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const rx=En("ArrayBuffer");function _k(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&rx(t.buffer),e}const Ck=au("string"),Bt=au("function"),sx=au("number"),ki=t=>t!==null&&typeof t=="object",kk=t=>t===!0||t===!1,Nl=t=>{if(!ki(t))return!1;const e=Si(t);return(e===null||e===Object.prototype||Si(e)===null)&&!Uo(t,nx)&&!Uo(t,ea)},Rk=t=>{if(!ki(t)||Ci(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Pk=En("Date"),Ak=En("File"),Ok=t=>!!(t&&typeof t.uri<"u"),Nk=t=>t&&typeof t.getParts<"u",Dk=En("Blob"),Lk=En("FileList"),Mk=t=>ki(t)&&Bt(t.pipe);function Ik(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Ty=Ik(),_y=typeof Ty.FormData<"u"?Ty.FormData:void 0,jk=t=>{if(!t)return!1;if(_y&&t instanceof _y)return!0;const e=Si(t);if(!e||e===Object.prototype||!Bt(t.append))return!1;const n=eh(t);return n==="formdata"||n==="object"&&Bt(t.toString)&&t.toString()==="[object FormData]"},Fk=En("URLSearchParams"),[Bk,Uk,Vk,zk]=["ReadableStream","Request","Response","Headers"].map(En),$k=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ta(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let s,o;if(typeof t!="object"&&(t=[t]),ks(t))for(s=0,o=t.length;s0;)if(o=n[s],e===o.toLowerCase())return o;return null}const cs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ox=t=>!bi(t)&&t!==cs;function cf(...t){const{caseless:e,skipUndefined:n}=ox(this)&&this||{},s={},o=(l,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const d=e&&typeof u=="string"&&ix(s,u)||u,f=ql(s,d)?s[d]:void 0;Nl(f)&&Nl(l)?s[d]=cf(f,l):Nl(l)?s[d]=cf({},l):ks(l)?s[d]=l.slice():(!n||!bi(l))&&(s[d]=l)};for(let l=0,u=t.length;l(ta(e,(o,l)=>{n&&Bt(o)?Object.defineProperty(t,l,{__proto__:null,value:tx(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,l,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:s}),t),Hk=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),qk=(t,e,n,s)=>{t.prototype=Object.create(e.prototype,s),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:e.prototype}),n&&Object.assign(t.prototype,n)},Kk=(t,e,n,s)=>{let o,l,u;const d={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),l=o.length;l-- >0;)u=o[l],(!s||s(u,t,e))&&!d[u]&&(e[u]=t[u],d[u]=!0);t=n!==!1&&Si(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Qk=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const s=t.indexOf(e,n);return s!==-1&&s===n},Gk=t=>{if(!t)return null;if(ks(t))return t;let e=t.length;if(!sx(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Xk=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Si(Uint8Array)),Yk=(t,e)=>{const s=(t&&t[ea]).call(t);let o;for(;(o=s.next())&&!o.done;){const l=o.value;e.call(t,l[0],l[1])}},Jk=(t,e)=>{let n;const s=[];for(;(n=t.exec(e))!==null;)s.push(n);return s},Zk=En("HTMLFormElement"),eR=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,o){return s.toUpperCase()+o}),{propertyIsEnumerable:tR}=Object.prototype,nR=En("RegExp"),ax=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),s={};ta(n,(o,l)=>{let u;(u=e(o,l,t))!==!1&&(s[l]=u||o)}),Object.defineProperties(t,s)},rR=t=>{ax(t,(e,n)=>{if(Bt(t)&&["arguments","caller","callee"].includes(n))return!1;const s=t[n];if(Bt(s)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},sR=(t,e)=>{const n={},s=o=>{o.forEach(l=>{n[l]=!0})};return ks(t)?s(t):s(String(t).split(e)),n},iR=()=>{},oR=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function aR(t){return!!(t&&Bt(t.append)&&t[nx]==="FormData"&&t[ea])}const lR=t=>{const e=new WeakSet,n=s=>{if(ki(s)){if(e.has(s))return;if(Ci(s))return s;if(!("toJSON"in s)){e.add(s);const o=ks(s)?[]:{};return ta(s,(l,u)=>{const d=n(l);!bi(d)&&(o[u]=d)}),e.delete(s),o}}return s};return n(t)},uR=En("AsyncFunction"),cR=t=>t&&(ki(t)||Bt(t))&&Bt(t.then)&&Bt(t.catch),lx=((t,e)=>t?setImmediate:e?((n,s)=>(cs.addEventListener("message",({source:o,data:l})=>{o===cs&&l===n&&s.length&&s.shift()()},!1),o=>{s.push(o),cs.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Bt(cs.postMessage)),dR=typeof queueMicrotask<"u"?queueMicrotask.bind(cs):typeof process<"u"&&process.nextTick||lx,ux=t=>t!=null&&Bt(t[ea]),fR=t=>t!=null&&Uo(t,ea)&&ux(t),M={isArray:ks,isArrayBuffer:rx,isBuffer:Ci,isFormData:jk,isArrayBufferView:_k,isString:Ck,isNumber:sx,isBoolean:kk,isObject:ki,isPlainObject:Nl,isEmptyObject:Rk,isReadableStream:Bk,isRequest:Uk,isResponse:Vk,isHeaders:zk,isUndefined:bi,isDate:Pk,isFile:Ak,isReactNativeBlob:Ok,isReactNative:Nk,isBlob:Dk,isRegExp:nR,isFunction:Bt,isStream:Mk,isURLSearchParams:Fk,isTypedArray:Xk,isFileList:Lk,forEach:ta,merge:cf,extend:Wk,trim:$k,stripBOM:Hk,inherits:qk,toFlatObject:Kk,kindOf:eh,kindOfTest:En,endsWith:Qk,toArray:Gk,forEachEntry:Yk,matchAll:Jk,isHTMLForm:Zk,hasOwnProperty:ql,hasOwnProp:ql,hasOwnInPrototypeChain:Uo,getSafeProp:Tk,reduceDescriptors:ax,freezeMethods:rR,toObjectSet:sR,toCamelCase:eR,noop:iR,toFiniteNumber:oR,findKey:ix,global:cs,isContextDefined:ox,isSpecCompliantForm:aR,toJSONObject:lR,isAsyncFn:uR,isThenable:cR,setImmediate:lx,asap:dR,isIterable:ux,isSafeIterable:fR},hR=M.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),pR=t=>{const e={};let n,s,o;return t&&t.split(` `).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),s=u.substring(o+1).trim(),!(!n||e[n]&&hR[n])&&(n==="set-cookie"?e[n]?e[n].push(s):e[n]=[s]:e[n]=e[n]?e[n]+", "+s:s)}),e};function mR(t){let e=0,n=t.length;for(;ee;){const s=t.charCodeAt(n-1);if(s!==9&&s!==32)break;n-=1}return e===0&&n===t.length?t:t.slice(e,n)}const gR=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),yR=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function th(t,e){return M.isArray(t)?t.map(n=>th(n,e)):mR(String(t).replace(e,""))}const vR=t=>th(t,gR),wR=t=>th(t,yR);function cx(t){const e=Object.create(null);return M.forEach(t.toJSON(),(n,s)=>{e[s]=wR(n)}),e}const Cy=Symbol("internals");function vo(t){return t&&String(t).trim().toLowerCase()}function Dl(t){return t===!1||t==null?t:M.isArray(t)?t.map(Dl):vR(String(t))}function xR(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(t);)e[s[1]]=s[2];return e}const SR=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function gd(t,e,n,s,o){if(M.isFunction(s))return s.call(this,e,n);if(o&&(e=n),!!M.isString(e)){if(M.isString(s))return e.indexOf(s)!==-1;if(M.isRegExp(s))return s.test(e)}}function bR(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,s)=>n.toUpperCase()+s)}function ER(t,e){const n=M.toCamelCase(" "+e);["get","set","has"].forEach(s=>{Object.defineProperty(t,s+n,{__proto__:null,value:function(o,l,u){return this[s].call(this,e,o,l,u)},configurable:!0})})}let Ct=class{constructor(e){e&&this.set(e)}set(e,n,s){const o=this;function l(d,f,p){const g=vo(f);if(!g)return;const y=M.findKey(o,g);(!y||o[y]===void 0||p===!0||p===void 0&&o[y]!==!1)&&(o[y||f]=Dl(d))}const u=(d,f)=>M.forEach(d,(p,g)=>l(p,g,f));if(M.isPlainObject(e)||e instanceof this.constructor)u(e,n);else if(M.isString(e)&&(e=e.trim())&&!SR(e))u(pR(e),n);else if(M.isObject(e)&&M.isSafeIterable(e)){let d=Object.create(null),f,p;for(const g of e){if(!M.isArray(g))throw new TypeError("Object iterator must return a key-value pair");p=g[0],M.hasOwnProp(d,p)?(f=d[p],d[p]=M.isArray(f)?[...f,g[1]]:[f,g[1]]):d[p]=g[1]}u(d,n)}else e!=null&&l(n,e,s);return this}get(e,n){if(e=vo(e),e){const s=M.findKey(this,e);if(s){const o=this[s];if(!n)return o;if(n===!0)return xR(o);if(M.isFunction(n))return n.call(this,o,s);if(M.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=vo(e),e){const s=M.findKey(this,e);return!!(s&&this[s]!==void 0&&(!n||gd(this,this[s],s,n)))}return!1}delete(e,n){const s=this;let o=!1;function l(u){if(u=vo(u),u){const d=M.findKey(s,u);d&&(!n||gd(s,s[d],d,n))&&(delete s[d],o=!0)}}return M.isArray(e)?e.forEach(l):l(e),o}clear(e){const n=Object.keys(this);let s=n.length,o=!1;for(;s--;){const l=n[s];(!e||gd(this,this[l],l,e,!0))&&(delete this[l],o=!0)}return o}normalize(e){const n=this,s={};return M.forEach(this,(o,l)=>{const u=M.findKey(s,l);if(u){n[u]=Dl(o),delete n[l];return}const d=e?bR(l):String(l).trim();d!==l&&delete n[l],n[d]=Dl(o),s[d]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return M.forEach(this,(s,o)=>{s!=null&&s!==!1&&(n[o]=e&&M.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const s=new this(e);return n.forEach(o=>s.set(o)),s}static accessor(e){const s=(this[Cy]=this[Cy]={accessors:{}}).accessors,o=this.prototype;function l(u){const d=vo(u);s[d]||(ER(o,u),s[d]=!0)}return M.isArray(e)?e.forEach(l):l(e),this}};Ct.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);M.reduceDescriptors(Ct.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(s){this[n]=s}}});M.freezeMethods(Ct);const TR="[REDACTED ****]";function _R(t){if(M.hasOwnProp(t,"toJSON"))return!0;let e=Object.getPrototypeOf(t);for(;e&&e!==Object.prototype;){if(M.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function CR(t,e){const n=new Set(e.map(l=>String(l).toLowerCase())),s=[],o=l=>{if(l===null||typeof l!="object"||M.isBuffer(l))return l;if(s.indexOf(l)!==-1)return;l instanceof Ct&&(l=l.toJSON()),s.push(l);let u;if(M.isArray(l))u=[],l.forEach((d,f)=>{const p=o(d);M.isUndefined(p)||(u[f]=p)});else{if(!M.isPlainObject(l)&&_R(l))return s.pop(),l;u=Object.create(null);for(const[d,f]of Object.entries(l)){const p=n.has(d.toLowerCase())?TR:o(f);M.isUndefined(p)||(u[d]=p)}}return s.pop(),u};return o(t)}let J=class dx extends Error{static from(e,n,s,o,l,u){const d=new dx(e.message,n||e.code,s,o,l);return Object.defineProperty(d,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),d.name=e.name,e.status!=null&&d.status==null&&(d.status=e.status),u&&Object.assign(d,u),d}constructor(e,n,s,o,l){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),s&&(this.config=s),o&&(this.request=o),l&&(this.response=l,this.status=l.status)}toJSON(){const e=this.config,n=e&&M.hasOwnProp(e,"redact")?e.redact:void 0,s=M.isArray(n)&&n.length>0?CR(e,n):M.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:s,code:this.code,status:this.status}}};J.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";J.ERR_BAD_OPTION="ERR_BAD_OPTION";J.ECONNABORTED="ECONNABORTED";J.ETIMEDOUT="ETIMEDOUT";J.ECONNREFUSED="ECONNREFUSED";J.ERR_NETWORK="ERR_NETWORK";J.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";J.ERR_DEPRECATED="ERR_DEPRECATED";J.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";J.ERR_BAD_REQUEST="ERR_BAD_REQUEST";J.ERR_CANCELED="ERR_CANCELED";J.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";J.ERR_INVALID_URL="ERR_INVALID_URL";J.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const kR=null,fx=100;function df(t){return M.isPlainObject(t)||M.isArray(t)}function hx(t){return M.endsWith(t,"[]")?t.slice(0,-2):t}function yd(t,e,n){return t?t.concat(e).map(function(o,l){return o=hx(o),!n&&l?"["+o+"]":o}).join(n?".":""):e}function RR(t){return M.isArray(t)&&!t.some(df)}const PR=M.toFlatObject(M,{},null,function(e){return/^is[A-Z]/.test(e)});function lu(t,e,n){if(!M.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=M.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(P,k){return!M.isUndefined(k[P])});const s=n.metaTokens,o=n.visitor||R,l=n.dots,u=n.indexes,d=n.Blob||typeof Blob<"u"&&Blob,f=n.maxDepth===void 0?fx:n.maxDepth,p=d&&M.isSpecCompliantForm(e),g=[];if(!M.isFunction(o))throw new TypeError("visitor must be a function");function y(S){if(S===null)return"";if(M.isDate(S))return S.toISOString();if(M.isBoolean(S))return S.toString();if(!p&&M.isBlob(S))throw new J("Blob is not supported. Use a Buffer instead.");if(M.isArrayBuffer(S)||M.isTypedArray(S)){if(p&&typeof d=="function")return new d([S]);if(typeof Buffer<"u")return Buffer.from(S);throw new J("Blob is not supported. Use a Buffer instead.",J.ERR_NOT_SUPPORT)}return S}function w(S){if(S>f)throw new J("Object is too deeply nested ("+S+" levels). Max depth: "+f,J.ERR_FORM_DATA_DEPTH_EXCEEDED)}function E(S,P){if(f===1/0)return JSON.stringify(S);const k=[];return JSON.stringify(S,function(F,V){if(!M.isObject(V))return V;for(;k.length&&k[k.length-1]!==this;)k.pop();return k.push(V),w(P+k.length-1),V})}function R(S,P,k){let A=S;if(M.isReactNative(e)&&M.isReactNativeBlob(S))return e.append(yd(k,P,l),y(S)),!1;if(S&&!k&&typeof S=="object"){if(M.endsWith(P,"{}"))P=s?P:P.slice(0,-2),S=E(S,1);else if(M.isArray(S)&&RR(S)||(M.isFileList(S)||M.endsWith(P,"[]"))&&(A=M.toArray(S)))return P=hx(P),A.forEach(function(V,q){!(M.isUndefined(V)||V===null)&&e.append(u===!0?yd([P],q,l):u===null?P:P+"[]",y(V))}),!1}return df(S)?!0:(e.append(yd(k,P,l),y(S)),!1)}const b=Object.assign(PR,{defaultVisitor:R,convertValue:y,isVisitable:df});function x(S,P,k=0){if(!M.isUndefined(S)){if(w(k),g.indexOf(S)!==-1)throw new Error("Circular reference detected in "+P.join("."));g.push(S),M.forEach(S,function(F,V){(!(M.isUndefined(F)||F===null)&&o.call(e,F,M.isString(V)?V.trim():V,P,b))===!0&&x(F,P?P.concat(V):[V],k+1)}),g.pop()}}if(!M.isObject(t))throw new TypeError("data must be an object");return x(t),e}function ky(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(s){return e[s]})}function nh(t,e){this._pairs=[],t&&lu(t,this,e)}const px=nh.prototype;px.append=function(e,n){this._pairs.push([e,n])};px.toString=function(e){const n=e?s=>e.call(this,s,ky):ky;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function AR(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function mx(t,e,n){if(!e)return t;t=t||"";const s=M.isFunction(n)?{serialize:n}:n,o=M.getSafeProp(s,"encode")||AR,l=M.getSafeProp(s,"serialize");let u;if(l?u=l(e,s):u=M.isURLSearchParams(e)?e.toString():new nh(e,s).toString(o),u){const d=t.indexOf("#");d!==-1&&(t=t.slice(0,d)),t+=(t.indexOf("?")===-1?"?":"&")+u}return t}class Ry{constructor(){this.handlers=[]}use(e,n,s){return this.handlers.push({fulfilled:e,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){M.forEach(this.handlers,function(s){s!==null&&e(s)})}}const rh={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},OR=typeof URLSearchParams<"u"?URLSearchParams:nh,NR=typeof FormData<"u"?FormData:null,DR=typeof Blob<"u"?Blob:null,LR={isBrowser:!0,classes:{URLSearchParams:OR,FormData:NR,Blob:DR},protocols:["http","https","file","blob","url","data"]},sh=typeof window<"u"&&typeof document<"u",ff=typeof navigator=="object"&&navigator||void 0,MR=sh&&(!ff||["ReactNative","NativeScript","NS"].indexOf(ff.product)<0),IR=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",jR=sh&&window.location.href||"http://localhost",FR=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:sh,hasStandardBrowserEnv:MR,hasStandardBrowserWebWorkerEnv:IR,navigator:ff,origin:jR},Symbol.toStringTag,{value:"Module"})),yt={...FR,...LR};function BR(t,e){return lu(t,new yt.classes.URLSearchParams,{visitor:function(n,s,o,l){return yt.isNode&&M.isBuffer(n)?(this.append(s,n.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)},...e})}const Py=fx;function gx(t){if(t>Py)throw new J("FormData field is too deeply nested ("+t+" levels). Max depth: "+Py,J.ERR_FORM_DATA_DEPTH_EXCEEDED)}function UR(t){const e=[],n=/\w+|\[(\w*)]/g;let s;for(;(s=n.exec(t))!==null;)gx(e.length),e.push(s[0]==="[]"?"":s[1]||s[0]);return e}function VR(t){const e={},n=Object.keys(t);let s;const o=n.length;let l;for(s=0;s=n.length;return u=!u&&M.isArray(o)?o.length:u,f?(M.hasOwnProp(o,u)?o[u]=M.isArray(o[u])?o[u].concat(s):[o[u],s]:o[u]=s,!d):((!M.hasOwnProp(o,u)||!M.isObject(o[u]))&&(o[u]=[]),e(n,s,o[u],l)&&M.isArray(o[u])&&(o[u]=VR(o[u])),!d)}if(M.isFormData(t)&&M.isFunction(t.entries)){const n={};return M.forEachEntry(t,(s,o)=>{e(UR(s),o,n,0)}),n}return null}const ti=(t,e)=>t!=null&&M.hasOwnProp(t,e)?t[e]:void 0;function zR(t,e,n){if(M.isString(t))try{return(e||JSON.parse)(t),M.trim(t)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(t)}const na={transitional:rh,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const s=n.getContentType()||"",o=s.indexOf("application/json")>-1,l=M.isObject(e);if(l&&M.isHTMLForm(e)&&(e=new FormData(e)),M.isFormData(e))return o?JSON.stringify(yx(e)):e;if(M.isArrayBuffer(e)||M.isBuffer(e)||M.isStream(e)||M.isFile(e)||M.isBlob(e)||M.isReadableStream(e))return e;if(M.isArrayBufferView(e))return e.buffer;if(M.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let d;if(l){const f=ti(this,"formSerializer");if(s.indexOf("application/x-www-form-urlencoded")>-1)return BR(e,f).toString();if((d=M.isFileList(e))||s.indexOf("multipart/form-data")>-1){const p=ti(this,"env"),g=p&&p.FormData;return lu(d?{"files[]":e}:e,g&&new g,f)}}return l||o?(n.setContentType("application/json",!1),zR(e)):e}],transformResponse:[function(e){const n=ti(this,"transitional")||na.transitional,s=n&&n.forcedJSONParsing,o=ti(this,"responseType"),l=o==="json";if(M.isResponse(e)||M.isReadableStream(e))return e;if(e&&M.isString(e)&&(s&&!o||l)){const d=!(n&&n.silentJSONParsing)&&l;try{return JSON.parse(e,ti(this,"parseReviver"))}catch(f){if(d)throw f.name==="SyntaxError"?J.from(f,J.ERR_BAD_RESPONSE,this,null,ti(this,"response")):f}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:yt.classes.FormData,Blob:yt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};M.forEach(["delete","get","head","post","put","patch","query"],t=>{na.headers[t]={}});function vd(t,e){const n=this||na,s=e||n,o=Ct.from(s.headers);let l=s.data;return M.forEach(t,function(d){l=d.call(n,l,o.normalize(),e?e.status:void 0)}),o.normalize(),l}function vx(t){return!!(t&&t.__CANCEL__)}let ra=class extends J{constructor(e,n,s){super(e??"canceled",J.ERR_CANCELED,n,s),this.name="CanceledError",this.__CANCEL__=!0}};function wx(t,e,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?t(n):e(new J("Request failed with status code "+n.status,n.status>=400&&n.status<500?J.ERR_BAD_REQUEST:J.ERR_BAD_RESPONSE,n.config,n.request,n))}function $R(t){const e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return e&&e[1]||""}function WR(t,e){t=t||10;const n=new Array(t),s=new Array(t);let o=0,l=0,u;return e=e!==void 0?e:1e3,function(f){const p=Date.now(),g=s[l];u||(u=p),n[o]=f,s[o]=p;let y=l,w=0;for(;y!==o;)w+=n[y++],y=y%t;if(o=(o+1)%t,o===l&&(l=(l+1)%t),p-u{n=g,o=null,l&&(clearTimeout(l),l=null),t(...p)};return[(...p)=>{const g=Date.now(),y=g-n;y>=s?u(p,g):(o=p,l||(l=setTimeout(()=>{l=null,u(o)},s-y)))},()=>o&&u(o)]}const Kl=(t,e,n=3)=>{let s=0;const o=WR(50,250);return HR(l=>{if(!l||typeof l.loaded!="number")return;const u=l.loaded,d=l.lengthComputable?l.total:void 0,f=d!=null?Math.min(u,d):u,p=Math.max(0,f-s),g=o(p);s=Math.max(s,f);const y={loaded:f,total:d,progress:d?f/d:void 0,bytes:p,rate:g||void 0,estimated:g&&d?(d-f)/g:void 0,event:l,lengthComputable:d!=null,[e?"download":"upload"]:!0};t(y)},n)},Ay=(t,e)=>{const n=t!=null;return[s=>e[0]({lengthComputable:n,total:t,loaded:s}),e[1]]},Oy=t=>(...e)=>M.asap(()=>t(...e)),qR=yt.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,yt.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(yt.origin),yt.navigator&&/(msie|trident)/i.test(yt.navigator.userAgent)):()=>!0,KR=yt.hasStandardBrowserEnv?{write(t,e,n,s,o,l,u){if(typeof document>"u")return;const d=[`${t}=${encodeURIComponent(e)}`];M.isNumber(n)&&d.push(`expires=${new Date(n).toUTCString()}`),M.isString(s)&&d.push(`path=${s}`),M.isString(o)&&d.push(`domain=${o}`),l===!0&&d.push("secure"),M.isString(u)&&d.push(`SameSite=${u}`),document.cookie=d.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.split(";");for(let n=0;nt instanceof Ct?{...t}:t;function Rs(t,e){t=t||{},e=e||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function s(g,y,w,E){return M.isPlainObject(g)&&M.isPlainObject(y)?M.merge.call({caseless:E},g,y):M.isPlainObject(y)?M.merge({},y):M.isArray(y)?y.slice():y}function o(g,y,w,E){if(M.isUndefined(y)){if(!M.isUndefined(g))return s(void 0,g,w,E)}else return s(g,y,w,E)}function l(g,y){if(!M.isUndefined(y))return s(void 0,y)}function u(g,y){if(M.isUndefined(y)){if(!M.isUndefined(g))return s(void 0,g)}else return s(void 0,y)}function d(g){const y=M.hasOwnProp(e,"transitional")?e.transitional:void 0;if(!M.isUndefined(y))if(M.isPlainObject(y)){if(M.hasOwnProp(y,g))return y[g]}else return;const w=M.hasOwnProp(t,"transitional")?t.transitional:void 0;if(M.isPlainObject(w)&&M.hasOwnProp(w,g))return w[g]}function f(g,y,w){if(M.hasOwnProp(e,w))return s(g,y);if(M.hasOwnProp(t,w))return s(void 0,g)}const p={url:l,method:l,data:l,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:f,headers:(g,y,w)=>o(Dy(g),Dy(y),w,!0)};return M.forEach(Object.keys({...t,...e}),function(y){if(y==="__proto__"||y==="constructor"||y==="prototype")return;const w=M.hasOwnProp(p,y)?p[y]:o,E=M.hasOwnProp(t,y)?t[y]:void 0,R=M.hasOwnProp(e,y)?e[y]:void 0,b=w(E,R,y);M.isUndefined(b)&&w!==f||(n[y]=b)}),M.hasOwnProp(e,"validateStatus")&&M.isUndefined(e.validateStatus)&&d("validateStatusUndefinedResolves")===!1&&(M.hasOwnProp(t,"validateStatus")?n.validateStatus=s(void 0,t.validateStatus):delete n.validateStatus),n}const eP=["content-type","content-length"];function tP(t,e,n){if(n!=="content-only"){t.set(e);return}Object.entries(e||{}).forEach(([s,o])=>{eP.includes(s.toLowerCase())&&t.set(s,o)})}const nP=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,n)=>String.fromCharCode(parseInt(n,16)));function Sx(t){const e=Rs({},t),n=w=>M.hasOwnProp(e,w)?e[w]:void 0,s=n("data");let o=n("withXSRFToken");const l=n("xsrfHeaderName"),u=n("xsrfCookieName");let d=n("headers");const f=n("auth"),p=n("baseURL"),g=n("allowAbsoluteUrls"),y=n("url");if(e.headers=d=Ct.from(d),e.url=mx(xx(p,y,g,e),n("params"),n("paramsSerializer")),f){const w=M.getSafeProp(f,"username")||"",E=M.getSafeProp(f,"password")||"";try{d.set("Authorization","Basic "+btoa(w+":"+(E?nP(E):"")))}catch(R){throw J.from(R,J.ERR_BAD_OPTION_VALUE,t)}}if(M.isFormData(s)&&(yt.hasStandardBrowserEnv||yt.hasStandardBrowserWebWorkerEnv||M.isReactNative(s)?d.setContentType(void 0):M.isFunction(s.getHeaders)&&tP(d,s.getHeaders(),n("formDataHeaderPolicy"))),yt.hasStandardBrowserEnv&&(M.isFunction(o)&&(o=o(e)),o===!0||o==null&&qR(e.url))){const E=l&&u&&KR.read(u);E&&d.set(l,E)}return e}const rP=typeof XMLHttpRequest<"u",sP=rP&&function(t){return new Promise(function(n,s){const o=Sx(t);let l=o.data;const u=Ct.from(o.headers).normalize();let{responseType:d,onUploadProgress:f,onDownloadProgress:p}=o,g,y,w,E,R;function b(){E&&E(),R&&R(),o.cancelToken&&o.cancelToken.unsubscribe(g),o.signal&&o.signal.removeEventListener("abort",g)}let x=new XMLHttpRequest;x.open(o.method.toUpperCase(),o.url,!0),x.timeout=o.timeout;function S(){if(!x)return;const k=Ct.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),F={data:!d||d==="text"||d==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:k,config:t,request:x};wx(function(q){n(q),b()},function(q){s(q),b()},F),x=null}"onloadend"in x?x.onloadend=S:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.startsWith("file:"))||setTimeout(S)},x.onabort=function(){x&&(s(new J("Request aborted",J.ECONNABORTED,t,x)),b(),x=null)},x.onerror=function(A){const F=A&&A.message?A.message:"Network Error",V=new J(F,J.ERR_NETWORK,t,x);V.event=A||null,s(V),b(),x=null},x.ontimeout=function(){let A=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const F=o.transitional||rh;o.timeoutErrorMessage&&(A=o.timeoutErrorMessage),s(new J(A,F.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,t,x)),b(),x=null},l===void 0&&u.setContentType(null),"setRequestHeader"in x&&M.forEach(cx(u),function(A,F){x.setRequestHeader(F,A)}),M.isUndefined(o.withCredentials)||(x.withCredentials=!!o.withCredentials),d&&d!=="json"&&(x.responseType=o.responseType),p&&([w,R]=Kl(p,!0),x.addEventListener("progress",w)),f&&x.upload&&([y,E]=Kl(f),x.upload.addEventListener("progress",y),x.upload.addEventListener("loadend",E)),(o.cancelToken||o.signal)&&(g=k=>{x&&(s(!k||k.type?new ra(null,t,x):k),x.abort(),b(),x=null)},o.cancelToken&&o.cancelToken.subscribe(g),o.signal&&(o.signal.aborted?g():o.signal.addEventListener("abort",g)));const P=$R(o.url);if(P&&!yt.protocols.includes(P)){s(new J("Unsupported protocol "+P+":",J.ERR_BAD_REQUEST,t)),b();return}x.send(l||null)})},iP=(t,e)=>{if(t=t?t.filter(Boolean):[],!e&&!t.length)return;const n=new AbortController;let s=!1;const o=function(f){if(!s){s=!0,u();const p=f instanceof Error?f:this.reason;n.abort(p instanceof J?p:new ra(p instanceof Error?p.message:p))}};let l=e&&setTimeout(()=>{l=null,o(new J(`timeout of ${e}ms exceeded`,J.ETIMEDOUT))},e);const u=()=>{t&&(l&&clearTimeout(l),l=null,t.forEach(f=>{f.unsubscribe?f.unsubscribe(o):f.removeEventListener("abort",o)}),t=null)};t.forEach(f=>f.addEventListener("abort",o,{once:!0}));const{signal:d}=n;return d.unsubscribe=()=>M.asap(u),d},oP=function*(t,e){let n=t.byteLength;if(n{const o=aP(t,e);let l=0,u,d=f=>{u||(u=!0,s&&s(f))};return new ReadableStream({async pull(f){try{const{done:p,value:g}=await o.next();if(p){d(),f.close();return}let y=g.byteLength;if(n){let w=l+=y;n(w)}f.enqueue(new Uint8Array(g))}catch(p){throw d(p),p}},cancel(f){return d(f),o.return()}},{highWaterMark:2})},Ql=t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102,uP=(t,e,n)=>e+2E>=2&&s.charCodeAt(E-2)===37&&s.charCodeAt(E-1)===51&&(s.charCodeAt(E)===68||s.charCodeAt(E)===100);p>=0&&(s.charCodeAt(p)===61?(f++,p--):g(p)&&(f++,p-=3)),f===1&&p>=0&&(s.charCodeAt(p)===61||g(p))&&f++;const w=Math.floor(u/4)*3-(f||0);return w>0?w:0}let l=0;for(let u=0,d=s.length;u=55296&&f<=56319&&u+1=56320&&p<=57343?(l+=4,u++):l+=3}else l+=3}return l}const ih="1.18.1",My=64*1024,{isFunction:El}=M,dP=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,n)=>String.fromCharCode(parseInt(n,16))),Iy=t=>{if(!M.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},jy=(t,...e)=>{try{return!!t(...e)}catch{return!1}},fP=t=>{const e=t.indexOf("://");let n=t;return e!==-1&&(n=n.slice(e+3)),n.includes("@")||n.includes(":")},hP=t=>{const e=M.global!==void 0&&M.global!==null?M.global:globalThis,{ReadableStream:n,TextEncoder:s}=e;t=M.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},t);const{fetch:o,Request:l,Response:u}=t,d=o?El(o):typeof fetch=="function",f=El(l),p=El(u);if(!d)return!1;const g=d&&El(n),y=d&&(typeof s=="function"?(S=>P=>S.encode(P))(new s):async S=>new Uint8Array(await new l(S).arrayBuffer())),w=f&&g&&jy(()=>{let S=!1;const P=new l(yt.origin,{body:new n,method:"POST",get duplex(){return S=!0,"half"}}),k=P.headers.has("Content-Type");return P.body!=null&&P.body.cancel(),S&&!k}),E=p&&g&&jy(()=>M.isReadableStream(new u("").body)),R={stream:E&&(S=>S.body)};d&&["text","arrayBuffer","blob","formData","stream"].forEach(S=>{!R[S]&&(R[S]=(P,k)=>{let A=P&&P[S];if(A)return A.call(P);throw new J(`Response type '${S}' is not supported`,J.ERR_NOT_SUPPORT,k)})});const b=async S=>{if(S==null)return 0;if(M.isBlob(S))return S.size;if(M.isSpecCompliantForm(S))return(await new l(yt.origin,{method:"POST",body:S}).arrayBuffer()).byteLength;if(M.isArrayBufferView(S)||M.isArrayBuffer(S))return S.byteLength;if(M.isURLSearchParams(S)&&(S=S+""),M.isString(S))return(await y(S)).byteLength},x=async(S,P)=>{const k=M.toFiniteNumber(S.getContentLength());return k??b(P)};return async S=>{let{url:P,method:k,data:A,signal:F,cancelToken:V,timeout:q,onDownloadProgress:B,onUploadProgress:Y,responseType:ne,headers:ve,withCredentials:Ce="same-origin",fetchOptions:Se,maxContentLength:Z,maxBodyLength:_e}=Sx(S);const Te=M.isNumber(Z)&&Z>-1,ce=M.isNumber(_e)&&_e>-1,Q=X=>M.hasOwnProp(S,X)?S[X]:void 0;let se=o||fetch;ne=ne?(ne+"").toLowerCase():"text";let z=iP([F,V&&V.toAbortSignal()],q),L=null;const $=z&&z.unsubscribe&&(()=>{z.unsubscribe()});let de,ge=null;const pe=()=>new J("Request body larger than maxBodyLength limit",J.ERR_BAD_REQUEST,S,L);try{let X;const be=Q("auth");if(be){const Ee=M.getSafeProp(be,"username")||"",dt=M.getSafeProp(be,"password")||"";X={username:Ee,password:dt}}if(fP(P)){const Ee=new URL(P,yt.origin);if(!X&&(Ee.username||Ee.password)){const dt=Iy(Ee.username),cn=Iy(Ee.password);X={username:dt,password:cn}}(Ee.username||Ee.password)&&(Ee.username="",Ee.password="",P=Ee.href)}if(X&&(ve.delete("authorization"),ve.set("Authorization","Basic "+btoa(dP((X.username||"")+":"+(X.password||""))))),Te&&typeof P=="string"&&P.startsWith("data:")&&cP(P)>Z)throw new J("maxContentLength size of "+Z+" exceeded",J.ERR_BAD_RESPONSE,S,L);if(ce&&k!=="get"&&k!=="head"){const Ee=await b(A);if(typeof Ee=="number"&&isFinite(Ee)&&(de=Ee,Ee>_e))throw pe()}const Pe=ce&&(M.isReadableStream(A)||M.isStream(A)),xe=(Ee,dt,cn)=>Ly(Ee,My,dn=>{if(ce&&dn>_e)throw ge=pe();dt&&dt(dn)},cn);if(w&&k!=="get"&&k!=="head"&&(Y||Pe)){if(de=de??await x(ve,A),de!==0||Pe){let Ee=new l(P,{method:"POST",body:A,duplex:"half"}),dt;if(M.isFormData(A)&&(dt=Ee.headers.get("content-type"))&&ve.setContentType(dt),Ee.body){const[cn,dn]=Y&&Ay(de,Kl(Oy(Y)))||[];A=xe(Ee.body,cn,dn)}}}else if(Pe&&!f&&g&&k!=="get"&&k!=="head")A=xe(A);else if(Pe&&f&&!w&&k!=="get"&&k!=="head")throw new J("Stream request bodies are not supported by the current fetch implementation",J.ERR_NOT_SUPPORT,S,L);M.isString(Ce)||(Ce=Ce?"include":"omit");const it=f&&"credentials"in l.prototype;if(M.isFormData(A)){const Ee=ve.getContentType();Ee&&/^multipart\/form-data/i.test(Ee)&&!/boundary=/i.test(Ee)&&ve.delete("content-type")}ve.set("User-Agent","axios/"+ih,!1);const Qt={...Se,signal:z,method:k.toUpperCase(),headers:cx(ve.normalize()),body:A,duplex:"half",credentials:it?Ce:void 0};L=f&&new l(P,Qt);let ct=await(f?se(L,Se):se(P,Qt));const un=Ct.from(ct.headers);if(Te){const Ee=M.toFiniteNumber(un.getContentLength());if(Ee!=null&&Ee>Z)throw new J("maxContentLength size of "+Z+" exceeded",J.ERR_BAD_RESPONSE,S,L)}const Gt=E&&(ne==="stream"||ne==="response");if(E&&ct.body&&(B||Te||Gt&&$)){const Ee={};["status","statusText","headers"].forEach(jn=>{Ee[jn]=ct[jn]});const dt=M.toFiniteNumber(un.getContentLength()),[cn,dn]=B&&Ay(dt,Kl(Oy(B),!0))||[];let tr=0;const nr=jn=>{if(Te&&(tr=jn,tr>Z))throw new J("maxContentLength size of "+Z+" exceeded",J.ERR_BAD_RESPONSE,S,L);cn&&cn(jn)};ct=new u(Ly(ct.body,My,nr,()=>{dn&&dn(),$&&$()}),Ee)}ne=ne||"text";let Xt=await R[M.findKey(R,ne)||"text"](ct,S);if(Te&&!E&&!Gt){let Ee;if(Xt!=null&&(typeof Xt.byteLength=="number"?Ee=Xt.byteLength:typeof Xt.size=="number"?Ee=Xt.size:typeof Xt=="string"&&(Ee=typeof s=="function"?new s().encode(Xt).byteLength:Xt.length)),typeof Ee=="number"&&Ee>Z)throw new J("maxContentLength size of "+Z+" exceeded",J.ERR_BAD_RESPONSE,S,L)}return!Gt&&$&&$(),await new Promise((Ee,dt)=>{wx(Ee,dt,{data:Xt,headers:Ct.from(ct.headers),status:ct.status,statusText:ct.statusText,config:S,request:L})})}catch(X){if($&&$(),z&&z.aborted&&z.reason instanceof J){const be=z.reason;throw be.config=S,L&&(be.request=L),X!==be&&Object.defineProperty(be,"cause",{__proto__:null,value:X,writable:!0,enumerable:!1,configurable:!0}),be}if(ge)throw L&&!ge.request&&(ge.request=L),ge;if(X instanceof J)throw L&&!X.request&&(X.request=L),X;if(X&&X.name==="TypeError"&&/Load failed|fetch/i.test(X.message)){const be=new J("Network Error",J.ERR_NETWORK,S,L,X&&X.response);throw Object.defineProperty(be,"cause",{__proto__:null,value:X.cause||X,writable:!0,enumerable:!1,configurable:!0}),be}throw J.from(X,X&&X.code,S,L,X&&X.response)}}},pP=new Map,bx=t=>{let e=t&&t.env||{};const{fetch:n,Request:s,Response:o}=e,l=[s,o,n];let u=l.length,d=u,f,p,g=pP;for(;d--;)f=l[d],p=g.get(f),p===void 0&&g.set(f,p=d?new Map:hP(e)),g=p;return p};bx();const oh={http:kR,xhr:sP,fetch:{get:bx}};M.forEach(oh,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:e})}});const Fy=t=>`- ${t}`,mP=t=>M.isFunction(t)||t===null||t===!1;function gP(t,e){t=M.isArray(t)?t:[t];const{length:n}=t;let s,o;const l={};for(let u=0;u`adapter ${f} `+(p===!1?"is not supported by the environment":"is not available in the build"));let d=n?u.length>1?`since : `+u.map(Fy).join(` `):" "+Fy(u[0]):"as no adapter specified";throw new J("There is no suitable adapter to dispatch the request "+d,J.ERR_NOT_SUPPORT)}return o}const Ex={getAdapter:gP,adapters:oh};function wd(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ra(null,t)}function By(t){return wd(t),t.headers=Ct.from(t.headers),t.data=vd.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Ex.getAdapter(t.adapter||na.adapter,t)(t).then(function(s){wd(t),t.response=s;try{s.data=vd.call(t,t.transformResponse,s)}finally{delete t.response}return s.headers=Ct.from(s.headers),s},function(s){if(!vx(s)&&(wd(t),s&&s.response)){t.response=s.response;try{s.response.data=vd.call(t,t.transformResponse,s.response)}finally{delete t.response}s.response.headers=Ct.from(s.response.headers)}return Promise.reject(s)})}const uu={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{uu[t]=function(s){return typeof s===t||"a"+(e<1?"n ":" ")+t}});const Uy={};uu.transitional=function(e,n,s){function o(l,u){return"[Axios v"+ih+"] Transitional option '"+l+"'"+u+(s?". "+s:"")}return(l,u,d)=>{if(e===!1)throw new J(o(u," has been removed"+(n?" in "+n:"")),J.ERR_DEPRECATED);return n&&!Uy[u]&&(Uy[u]=!0,console.warn(o(u," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(l,u,d):!0}};uu.spelling=function(e){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${e}`),!0)};function yP(t,e,n){if(typeof t!="object"||t===null)throw new J("options must be an object",J.ERR_BAD_OPTION_VALUE);const s=Object.keys(t);let o=s.length;for(;o-- >0;){const l=s[o],u=Object.prototype.hasOwnProperty.call(e,l)?e[l]:void 0;if(u){const d=t[l],f=d===void 0||u(d,l,t);if(f!==!0)throw new J("option "+l+" must be "+f,J.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new J("Unknown option "+l,J.ERR_BAD_OPTION)}}const Ll={assertOptions:yP,validators:uu},bt=Ll.validators;let Ss=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Ry,response:new Ry}}async request(e,n){try{return await this._request(e,n)}catch(s){if(s instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const l=(()=>{if(!o.stack)return"";const u=o.stack.indexOf(` `);return u===-1?"":o.stack.slice(u+1)})();try{if(!s.stack)s.stack=l;else if(l){const u=l.indexOf(` `),d=u===-1?-1:l.indexOf(` `,u+1),f=d===-1?"":l.slice(d+1);String(s.stack).endsWith(f)||(s.stack+=` `+l)}}catch{}}throw s}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Rs(this.defaults,n);const{transitional:s,paramsSerializer:o,headers:l}=n;s!==void 0&&Ll.assertOptions(s,{silentJSONParsing:bt.transitional(bt.boolean),forcedJSONParsing:bt.transitional(bt.boolean),clarifyTimeoutError:bt.transitional(bt.boolean),legacyInterceptorReqResOrdering:bt.transitional(bt.boolean),advertiseZstdAcceptEncoding:bt.transitional(bt.boolean),validateStatusUndefinedResolves:bt.transitional(bt.boolean)},!1),o!=null&&(M.isFunction(o)?n.paramsSerializer={serialize:o}:Ll.assertOptions(o,{encode:bt.function,serialize:bt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ll.assertOptions(n,{baseUrl:bt.spelling("baseURL"),withXsrfToken:bt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=l&&M.merge(l.common,l[n.method]);l&&M.forEach(["delete","get","head","post","put","patch","query","common"],R=>{delete l[R]}),n.headers=Ct.concat(u,l);const d=[];let f=!0;this.interceptors.request.forEach(function(b){if(typeof b.runWhen=="function"&&b.runWhen(n)===!1)return;f=f&&b.synchronous;const x=n.transitional||rh;x&&x.legacyInterceptorReqResOrdering?d.unshift(b.fulfilled,b.rejected):d.push(b.fulfilled,b.rejected)});const p=[];this.interceptors.response.forEach(function(b){p.push(b.fulfilled,b.rejected)});let g,y=0,w;if(!f){const R=[By.bind(this),void 0];for(R.unshift(...d),R.push(...p),w=R.length,g=Promise.resolve(n);y{if(!s._listeners)return;let l=s._listeners.length;for(;l-- >0;)s._listeners[l](o);s._listeners=null}),this.promise.then=o=>{let l;const u=new Promise(d=>{s.subscribe(d),l=d}).then(o);return u.cancel=function(){s.unsubscribe(l)},u},e(function(l,u,d){s.reason||(s.reason=new ra(l,u,d),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=s=>{e.abort(s)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Tx(function(o){e=o}),cancel:e}}};function wP(t){return function(n){return t.apply(null,n)}}function xP(t){return M.isObject(t)&&t.isAxiosError===!0}const hf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(hf).forEach(([t,e])=>{hf[e]=t});function _x(t){const e=new Ss(t),n=tx(Ss.prototype.request,e);return M.extend(n,Ss.prototype,e,{allOwnKeys:!0}),M.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return _x(Rs(t,o))},n}const Ze=_x(na);Ze.Axios=Ss;Ze.CanceledError=ra;Ze.CancelToken=vP;Ze.isCancel=vx;Ze.VERSION=ih;Ze.toFormData=lu;Ze.AxiosError=J;Ze.Cancel=Ze.CanceledError;Ze.all=function(e){return Promise.all(e)};Ze.spread=wP;Ze.isAxiosError=xP;Ze.mergeConfig=Rs;Ze.AxiosHeaders=Ct;Ze.formToJSON=t=>yx(M.isHTMLForm(t)?new FormData(t):t);Ze.getAdapter=Ex.getAdapter;Ze.HttpStatusCode=hf;Ze.default=Ze;const{Axios:DM,AxiosError:LM,CanceledError:MM,isCancel:IM,CancelToken:jM,VERSION:FM,all:BM,Cancel:UM,isAxiosError:VM,spread:zM,toFormData:$M,AxiosHeaders:WM,HttpStatusCode:HM,formToJSON:qM,getAdapter:KM,mergeConfig:QM,create:GM}=Ze,Cx=typeof window>"u",Vy=!Cx&&window.self!==window.top,SP=!Cx&&typeof document>"u",xd=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),pt=[];for(let t=0;t<256;++t)pt.push((t+256).toString(16).slice(1));function bP(t,e=0){return(pt[t[e+0]]+pt[t[e+1]]+pt[t[e+2]]+pt[t[e+3]]+"-"+pt[t[e+4]]+pt[t[e+5]]+"-"+pt[t[e+6]]+pt[t[e+7]]+"-"+pt[t[e+8]]+pt[t[e+9]]+"-"+pt[t[e+10]]+pt[t[e+11]]+pt[t[e+12]]+pt[t[e+13]]+pt[t[e+14]]+pt[t[e+15]]).toLowerCase()}let Sd;const EP=new Uint8Array(16);function TP(){if(!Sd){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Sd=crypto.getRandomValues.bind(crypto)}return Sd(EP)}const _P=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),zy={randomUUID:_P};function CP(t,e,n){var o;t=t||{};const s=t.random??((o=t.rng)==null?void 0:o.call(t))??TP();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,bP(s)}function kP(t,e,n){return zy.randomUUID&&!t?zy.randomUUID():CP(t)}const wo=typeof window<"u"?window:{base44SharedInstances:{}};function RP(t,e){return wo.base44SharedInstances||(wo.base44SharedInstances={}),wo.base44SharedInstances[t]||(wo.base44SharedInstances[t]={instance:e()}),wo.base44SharedInstances[t].instance}const PP="__user_heartbeat_event__",AP="__initialization_event__",OP="__session_duration_event__",$y="analytics-enable",Wy="base44_analytics_session_id",NP={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},DP="analytics",Fe=RP(DP,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,config:{...NP,...VP()}})),LP=({axiosClient:t,serverUrl:e,appId:n,userAuthModule:s})=>{var o;const{maxQueueSize:l,throttleTime:u,batchSize:d}=Fe.config;if(!(!((o=Fe.config)===null||o===void 0)&&o.enabled)||SP)return{track:()=>{},cleanup:()=>{}};let f;const p=`${e}/api/apps/${n}/analytics/track/batch`,g=async k=>{await t.request({method:"POST",url:`/apps/${n}/analytics/track/batch`,data:{events:k}})},y=k=>{try{const A=JSON.stringify({events:k}),F=new Blob([A],{type:"application/json"});return typeof navigator>"u"||A.length>6e4||!navigator.sendBeacon(p,F)}catch{return!1}},w=async(k,A={})=>{if(k.length===0)return;const F=await UP(s),V=k.map(BP(F));try{(!A.isBeacon||!y(V))&&await g(V)}catch{}},E=()=>{qy(w,{throttleTime:u,batchSize:d})},R=k=>{if(Fe.requestsQueue.length>=l)return;const A=FP();Fe.requestsQueue.push({...k,...A}),E()},b=()=>{qy(w,{throttleTime:u,batchSize:d}),f=Ky(R),IP()},x=()=>{Hy(),f==null||f(),jP(R);const k=Fe.requestsQueue.splice(0);w(k,{isBeacon:!0})},S=()=>{typeof window>"u"||(document.visibilityState==="hidden"?x():document.visibilityState==="visible"&&b())},P=()=>{Hy(),f==null||f(),typeof window<"u"&&window.removeEventListener("visibilitychange",S)};return E(),f=Ky(R),MP(R),typeof window<"u"&&window.addEventListener("visibilitychange",S),{track:R,cleanup:P}};function Hy(){Fe.isProcessing=!1}async function qy(t,e){if(Fe.isProcessing)return;Fe.isProcessing=!0;const{throttleTime:n=1e3,batchSize:s=30}=e??{};for(;Fe.isProcessing&&Fe.requestsQueue.length>0;){const o=Fe.requestsQueue.splice(0,s);o.length&&await t(o),await new Promise(l=>setTimeout(l,n))}Fe.isProcessing=!1}function Ky(t){var e;if(typeof window>"u"||Fe.isHeartBeatProcessing||((e=Fe.config.heartBeatInterval)!==null&&e!==void 0?e:0)<10)return()=>{};Fe.isHeartBeatProcessing=!0;const n=setInterval(()=>{t({eventName:PP})},Fe.config.heartBeatInterval);return()=>{clearInterval(n),Fe.isHeartBeatProcessing=!1}}function MP(t){typeof window>"u"||Fe.wasInitializationTracked||(Fe.wasInitializationTracked=!0,t({eventName:AP,properties:{referrer:document==null?void 0:document.referrer}}))}function IP(){typeof window>"u"||Fe.sessionStartTime!==null||(Fe.sessionStartTime=new Date().toISOString())}function jP(t){if(typeof window>"u"||Fe.sessionStartTime===null)return;const e=new Date().getTime()-new Date(Fe.sessionStartTime).getTime();Fe.sessionStartTime=null,t({eventName:OP,properties:{sessionDuration:e}})}function FP(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"?window.location.pathname:null}}function BP(t){return e=>({event_name:e.eventName,properties:e.properties,timestamp:e.timestamp,page_url:e.pageUrl,...t})}let Eo=null;function Qy(){Fe.sessionContext=null,Eo=null}async function UP(t){if(!Fe.sessionContext){if(!t.hasToken())return{user_id:null,session_id:Gl()};if(!Eo){const s=Gl();Eo=t.me().then(o=>({user_id:o.id,session_id:s})).catch(()=>({user_id:null,session_id:s}))}const e=Eo,n=await e;return Eo===e&&(Fe.sessionContext=n),n}return Fe.sessionContext}function VP(){if(typeof window>"u"||!window.location)return;const e=new URLSearchParams(window.location.search).get($y);if(e==null||!e.length)return;const n=new URLSearchParams(window.location.search);n.delete($y);const s=window.location.pathname+(n.toString()?"?"+n.toString():"");return window.history.replaceState({},"",s),{enabled:e==="true"}}function Gl(){if(typeof window>"u")return xd();try{const t=localStorage.getItem(Wy);if(!t){const e=xd();return localStorage.setItem(Wy,e),e}return t}catch{return xd()}}class zP extends Error{constructor(e,n,s,o,l){super(e),this.name="Base44Error",this.status=n,this.code=s,this.data=o,this.originalError=l}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function To({baseURL:t,headers:e={},token:n,interceptResponses:s=!0,onError:o}){const l=Ze.create({baseURL:t,headers:{"Content-Type":"application/json",Accept:"application/json",...e}});return n&&(l.defaults.headers.common.Authorization=`Bearer ${n}`),l.interceptors.request.use(u=>{typeof window<"u"&&window.location&&(u.headers.set("X-Origin-URL",window.location.href),u.headers.get("Authorization")||u.headers.set("X-Base44-Anonymous-Id",Gl()));const d=kP();if(u.requestId=d,Vy)try{window.parent.postMessage({type:"api-request-start",requestId:d,data:{url:t+u.url,method:u.method,body:u.data instanceof FormData?"[FormData object]":u.data}},"*")}catch{}return u}),s&&l.interceptors.response.use(u=>{var d;const f=(d=u.config)===null||d===void 0?void 0:d.requestId;try{Vy&&f&&window.parent.postMessage({type:"api-request-end",requestId:f,data:{statusCode:u.status,response:u.data}},"*")}catch{}return u.data},u=>{var d,f,p,g,y,w,E,R,b,x,S,P,k,A,F;const V=((f=(d=u.response)===null||d===void 0?void 0:d.data)===null||f===void 0?void 0:f.message)||((g=(p=u.response)===null||p===void 0?void 0:p.data)===null||g===void 0?void 0:g.detail)||u.message,q=new zP(V,(y=u.response)===null||y===void 0?void 0:y.status,(P=(R=(E=(w=u.response)===null||w===void 0?void 0:w.data)===null||E===void 0?void 0:E.code)!==null&&R!==void 0?R:(S=(x=(b=u.response)===null||b===void 0?void 0:b.headers)===null||x===void 0?void 0:x.get)===null||S===void 0?void 0:S.call(x,"x-base44-connector-error"))!==null&&P!==void 0?P:(A=(k=u.response)===null||k===void 0?void 0:k.headers)===null||A===void 0?void 0:A["x-base44-connector-error"],(F=u.response)===null||F===void 0?void 0:F.data,u);return o==null||o(q),Promise.reject(q)}),l}function Gy(t){const{axios:e,appId:n,getSocket:s}=t;return new Proxy({},{get(o,l){if(!(typeof l!="string"||l==="then"||l.startsWith("_")))return WP(e,n,l,s)}})}function $P(t){var e;try{const n=JSON.parse(t);return{type:n.type,data:n.data,id:n.id||((e=n.data)===null||e===void 0?void 0:e.id),timestamp:n.timestamp||new Date().toISOString()}}catch(n){return console.warn("[Base44 SDK] Failed to parse realtime message:",n),null}}function WP(t,e,n,s){const o=`/apps/${e}/entities/${n}`;return{async list(l,u,d,f){const p={};return l&&(p.sort=l),u&&(p.limit=u),d&&(p.skip=d),f&&(p.fields=Array.isArray(f)?f.join(","):f),t.get(o,{params:p})},async filter(l,u,d,f,p){const g={q:JSON.stringify(l)};return u&&(g.sort=u),d&&(g.limit=d),f&&(g.skip=f),p&&(g.fields=Array.isArray(p)?p.join(","):p),t.get(o,{params:g})},async get(l){return t.get(`${o}/${l}`)},async create(l){return t.post(o,l)},async update(l,u){return t.put(`${o}/${l}`,u)},async delete(l){return t.delete(`${o}/${l}`)},async deleteMany(l){return t.delete(o,{data:l})},async bulkCreate(l){return t.post(`${o}/bulk`,l)},async updateMany(l,u){return t.patch(`${o}/update-many`,{query:l,data:u})},async bulkUpdate(l){return t.put(`${o}/bulk`,l)},async importEntities(l){const u=new FormData;return u.append("file",l,l.name),t.post(`${o}/import`,u,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(l){const u=`entities:${e}:${n}`;return s().subscribeToRoom(u,{update_model:p=>{var g;const y=$P(p.data);if(y){y.type!=="delete"&&(!((g=y.data)===null||g===void 0)&&g._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${n}#${y.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${n}.get("${y.id}")\` to fetch the full record.`);try{l(y)}catch(w){console.error("[Base44 SDK] Subscription callback error:",w)}}}})}}}function HP(t,e){return{async call(n,s,o){if(!(n!=null&&n.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(s!=null&&s.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:l,queryParams:u,...d}=o??{},f={...d,...l&&{path_params:l},...u&&{query_params:u}};return await t.post(`/apps/${e}/integrations/custom/${n}/${s}`,f)}}}function Xy(t,e){const n=HP(t,e);return new Proxy({},{get(s,o){if(!(typeof o!="string"||o==="then"||o.startsWith("_")))return o==="custom"?n:new Proxy({},{get(l,u){if(!(typeof u!="string"||u==="then"||u.startsWith("_")))return async d=>{if(typeof d=="string")throw new Error(`Integration ${u} must receive an object with named parameters, received: ${d}`);let f,p;return d instanceof FormData||d&&Object.values(d).some(g=>g instanceof File)?(f=new FormData,Object.keys(d).forEach(g=>{d[g]instanceof File?f.append(g,d[g],d[g].name):typeof d[g]=="object"&&d[g]!==null?f.append(g,JSON.stringify(d[g])):f.append(g,d[g])}),p="multipart/form-data"):(f=d,p="application/json"),o==="Core"?t.post(`/apps/${e}/integration-endpoints/Core/${u}`,f||d,{headers:{"Content-Type":p}}):t.post(`/apps/${e}/integration-endpoints/installable/${o}/integration-endpoints/${u}`,f||d,{headers:{"Content-Type":p}})}}})}})}function qP(){return typeof window>"u"?!1:window!==window.parent}function KP(t,e,n){const l=Math.round(window.screenX+(window.outerWidth-500)/2),u=Math.round(window.screenY+(window.outerHeight-600)/2),d=window.open(t,"base44_auth",`width=500,height=600,left=${l},top=${u},resizable=yes,scrollbars=yes`);if(!d)return;const f=()=>{window.removeEventListener("message",p),clearInterval(g),d.closed||d.close()},p=y=>{var w;if(y.origin!==n||y.source!==d||!(!((w=y.data)===null||w===void 0)&&w.access_token))return;f();const E=new URL(e),{access_token:R,is_new_user:b}=y.data;E.searchParams.set("access_token",R),b!=null&&E.searchParams.set("is_new_user",String(b)),window.location.href=E.toString()},g=setInterval(()=>{d.closed&&f()},500);window.addEventListener("message",p)}function QP(t,e,n,s){let o=null;const l=()=>{o=null};let u=!!s.token;return{hasToken(){return u},async me(){const d=o??t.get(`/apps/${n}/entities/User/me`).finally(()=>{o===d&&(o=null)});return o=d,d},async updateMe(d){return t.put(`/apps/${n}/entities/User/me`,d)},redirectToLogin(d){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const f=d?new URL(d,window.location.origin).toString():window.location.href,p=`${s.appBaseUrl}/login?from_url=${encodeURIComponent(f)}`;window.location.href=p},loginWithProvider(d,f="/"){const p=new URL(f,window.location.origin).toString(),g=`app_id=${n}&from_url=${encodeURIComponent(p)}`;let y;d==="sso"?y=`/apps/${n}/auth/sso/login`:y=`/apps/auth${d==="google"?"":`/${d}`}/login`;const w=`${s.appBaseUrl}/api${y}?${g}`;if(qP()){const E=`${w}&popup_origin=${encodeURIComponent(window.location.origin)}`;return KP(E,p,window.location.origin)}window.location.href=w},logout(d){if(delete t.defaults.headers.common.Authorization,l(),Qy(),u=!1,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(g){console.error("Failed to remove token from localStorage:",g)}const f=d||window.location.href,p=`${s.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(f)}`;window.location.href=p}},setToken(d,f=!0){if(d&&(l(),Qy(),u=!0,t.defaults.headers.common.Authorization=`Bearer ${d}`,e.defaults.headers.common.Authorization=`Bearer ${d}`,f&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",d),window.localStorage.setItem("token",d)}catch(p){console.error("Failed to save token to localStorage:",p)}},async loginViaEmailPassword(d,f,p){var g;try{const y=await t.post(`/apps/${n}/auth/login`,{email:d,password:f,...p&&{turnstile_token:p}}),{access_token:w,user:E}=y;return w&&this.setToken(w),{access_token:w,user:E}}catch(y){throw((g=y.response)===null||g===void 0?void 0:g.status)===401&&await this.logout(),y}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(d,f){return t.post(`/apps/${n}/users/invite-user`,{user_email:d,role:f})},register(d){return t.post(`/apps/${n}/auth/register`,d)},verifyOtp({email:d,otpCode:f}){return t.post(`/apps/${n}/auth/verify-otp`,{email:d,otp_code:f})},resendOtp(d){return t.post(`/apps/${n}/auth/resend-otp`,{email:d})},resetPasswordRequest(d){return t.post(`/apps/${n}/auth/reset-password-request`,{email:d})},resetPassword({resetToken:d,newPassword:f}){return t.post(`/apps/${n}/auth/reset-password`,{reset_token:d,new_password:f})},changePassword({userId:d,currentPassword:f,newPassword:p}){return t.post(`/apps/${n}/auth/change-password`,{user_id:d,current_password:f,new_password:p})}}}function GP(t,e){return{async getAccessToken(n){const s=`/apps/${e}/auth/sso/accesstoken/${n}`;return t.get(s)},async getIdToken(n){const s=`/apps/${e}/auth/sso/idtoken/${n}`;return t.get(s)}}}const XP=new Set(["GET","POST","PUT","PATCH","DELETE","HEAD"]);function YP(t,e){return{async getAccessToken(n){if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");return(await t.get(`/apps/${e}/external-auth/tokens/${encodeURIComponent(n)}`)).access_token},async getConnection(n){var s;if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");const l=await t.get(`/apps/${e}/external-auth/tokens/${encodeURIComponent(n)}`);return{accessToken:l.access_token,connectionConfig:(s=l.connection_config)!==null&&s!==void 0?s:null}},async getWorkspaceConnection(n){var s;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const l=await t.get(`/apps/${e}/external-auth/tokens/connectors/${encodeURIComponent(n)}`);return{accessToken:l.access_token,connectionConfig:(s=l.connection_config)!==null&&s!==void 0?s:null}},async getCurrentAppUserAccessToken(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await t.get(`/apps/${e}/app-user-auth/connectors/${encodeURIComponent(n)}/token`)).access_token},async getCurrentAppUserConnection(n){var s;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const l=await t.get(`/apps/${e}/app-user-auth/connectors/${encodeURIComponent(n)}/token`);return{accessToken:l.access_token,connectionConfig:(s=l.connection_config)!==null&&s!==void 0?s:null}},async callApi(n,s){return kx(n,"Integration type"),JP(t,`/apps/${e}/connectors/${encodeURIComponent(n)}/call`,s)}}}function kx(t,e){if(!t||typeof t!="string")throw new Error(`${e} is required and must be a string`)}async function JP(t,e,n){var s,o,l,u,d,f,p,g,y;if(!n||typeof n!="object")throw new Error("Request is required and must be an object");kx(n.path,"Request path");const w=(s=n.method)!==null&&s!==void 0?s:"GET";if(!XP.has(w))throw new Error("Request method must be one of GET, POST, PUT, PATCH, DELETE, or HEAD");const R=await t.post(e,{method:w,...n.host==null?{}:{host:n.host},path:n.path,query:(o=n.query)!==null&&o!==void 0?o:{},headers:(l=n.headers)!==null&&l!==void 0?l:{},body:(u=n.body)!==null&&u!==void 0?u:null});return{success:R.success,phase:R.phase,status:(d=R.status_code)!==null&&d!==void 0?d:null,data:R.data,dataBase64:(f=R.data_base64)!==null&&f!==void 0?f:null,contentType:(p=R.content_type)!==null&&p!==void 0?p:null,headers:(g=R.headers)!==null&&g!==void 0?g:{},creditsCharged:(y=R.credits_charged)!==null&&y!==void 0?y:0}}function ZP(t,e){return{async connectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await t.post(`/apps/${e}/app-user-auth/connectors/${encodeURIComponent(n)}/initiate`)).redirect_url},async disconnectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");await t.delete(`/apps/${e}/app-user-auth/connectors/${encodeURIComponent(n)}`)}}}function bs(t={}){const{storageKey:e="base44_access_token",paramName:n="access_token",saveToStorage:s=!0,removeFromUrl:o=!0}=t;let l=null;if(typeof window<"u"&&window.location)try{const u=new URLSearchParams(window.location.search);if(l=u.get(n),l){if(s&&eA(l,{storageKey:e}),o){u.delete(n);const d=`${window.location.pathname}${u.toString()?`?${u.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,d)}return l}}catch(u){console.error("Error retrieving token from URL:",u)}if(typeof window<"u"&&window.localStorage)try{return l=window.localStorage.getItem(e),l}catch(u){console.error("Error retrieving token from local storage:",u)}return null}function eA(t,e){const{storageKey:n="base44_access_token"}=e;if(typeof window>"u"||!window.localStorage||!t)return!1;try{return window.localStorage.setItem(n,t),window.localStorage.setItem("token",t),!0}catch(s){return console.error("Error saving token to local storage:",s),!1}}function Yy(t,e,n){const s=(l,u)=>l?`${String(l).replace(/\/$/,"")}${u}`:u,o=l=>{const u=new Headers;if(n!=null&&n.getAuthHeaders){const d=n.getAuthHeaders();Object.entries(d).forEach(([f,p])=>{p!=null&&u.set(f,String(p))})}return l&&new Headers(l).forEach((d,f)=>{u.set(f,d)}),u};return{async invoke(l,u){if(typeof u=="string")throw new Error(`Function ${l} must receive an object with named parameters, received: ${u}`);let d,f;return u instanceof FormData||u&&Object.values(u).some(p=>p instanceof File)?(d=new FormData,Object.keys(u).forEach(p=>{u[p]instanceof File?d.append(p,u[p],u[p].name):typeof u[p]=="object"&&u[p]!==null?d.append(p,JSON.stringify(u[p])):d.append(p,u[p])}),f="multipart/form-data"):(d=u,f="application/json"),t.post(`/apps/${e}/functions/${l}`,d||u,{headers:{"Content-Type":f}})},async fetch(l,u={}){const f=`/functions${l.startsWith("/")?l:`/${l}`}`,p=o(u.headers),g={...u,headers:p};return await fetch(s(n==null?void 0:n.baseURL,f),g)}}}function Jy({axios:t,getSocket:e,appId:n,serverUrl:s,token:o}){const l=`/apps/${n}/agents`,u={},d=()=>t.get(`${l}/conversations`),f=b=>t.get(`${l}/conversations/${b}`);return{getConversations:d,getConversation:f,listConversations:b=>t.get(`${l}/conversations`,{params:b}),createConversation:b=>t.post(`${l}/conversations`,b),addMessage:async(b,x)=>t.post(`${l}/conversations/v2/${b.id}/messages`,x),subscribeToConversation:(b,x)=>{const S=`/agent-conversations/${b}`,P=e(),k=f(b).then(A=>(u[b]=A,A));return P.subscribeToRoom(S,{connect:()=>{},update_model:async({data:A})=>{const F=JSON.parse(A);if(F._message){await k;const V=F._message,q=u[b];if(q){const B=q.messages||[],Y=B.findIndex(ve=>ve.id===V.id),ne=Y!==-1?B.map((ve,Ce)=>Ce===Y?V:ve):[...B,V];u[b]={...q,messages:ne},x==null||x(u[b])}}}})},getWhatsAppConnectURL:b=>{const x=`${s}/api/apps/${n}/agents/${encodeURIComponent(b)}/whatsapp`,S=o??bs();return S?`${x}?token=${S}`:x},getTelegramConnectURL:b=>{const x=`${s}/api/apps/${n}/agents/${encodeURIComponent(b)}/telegram`,S=o??bs();return S?`${x}?token=${S}`:x}}}function Zy({serverUrl:t,token:e,appId:n}){return{connection:()=>{var o;return{baseURL:`${t}/api/apps/${n}/ai/openai/v1`,token:(o=e??bs())!==null&&o!==void 0?o:""}}}}function ev(t,e){const n=`/app-logs/${e}`;return{async logUserInApp(s){await t.post(`${n}/log-user-in-app/${s}`)},async fetchLogs(s={}){return await t.get(n,{params:s})},async getStats(s={}){return await t.get(`${n}/stats`,{params:s})}}}function tA(t,e){return{async inviteUser(n,s){if(s!=="user"&&s!=="admin")throw new Error(`Invalid role: "${s}". Role must be either "user" or "admin".`);return await t.post(`/apps/${e}/runtime/users/invite-user`,{user_email:n,role:s})}}}const Mn=Object.create(null);Mn.open="0";Mn.close="1";Mn.ping="2";Mn.pong="3";Mn.message="4";Mn.upgrade="5";Mn.noop="6";const Ml=Object.create(null);Object.keys(Mn).forEach(t=>{Ml[Mn[t]]=t});const pf={type:"error",data:"parser error"},Rx=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Px=typeof ArrayBuffer=="function",Ax=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,ah=({type:t,data:e},n,s)=>Rx&&e instanceof Blob?n?s(e):tv(e,s):Px&&(e instanceof ArrayBuffer||Ax(e))?n?s(e):tv(new Blob([e]),s):s(Mn[t]+(e||"")),tv=(t,e)=>{const n=new FileReader;return n.onload=function(){const s=n.result.split(",")[1];e("b"+(s||""))},n.readAsDataURL(t)};function nv(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let bd;function nA(t,e){if(Rx&&t.data instanceof Blob)return t.data.arrayBuffer().then(nv).then(e);if(Px&&(t.data instanceof ArrayBuffer||Ax(t.data)))return e(nv(t.data));ah(t,!1,n=>{bd||(bd=new TextEncoder),e(bd.encode(n))})}const rv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_o=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t{let e=t.length*.75,n=t.length,s,o=0,l,u,d,f;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const p=new ArrayBuffer(e),g=new Uint8Array(p);for(s=0;s>4,g[o++]=(u&15)<<4|d>>2,g[o++]=(d&3)<<6|f&63;return p},sA=typeof ArrayBuffer=="function",lh=(t,e)=>{if(typeof t!="string")return{type:"message",data:Ox(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:iA(t.substring(1),e)}:Ml[n]?t.length>1?{type:Ml[n],data:t.substring(1)}:{type:Ml[n]}:pf},iA=(t,e)=>{if(sA){const n=rA(t);return Ox(n,e)}else return{base64:!0,data:t}},Ox=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},Nx="",oA=(t,e)=>{const n=t.length,s=new Array(n);let o=0;t.forEach((l,u)=>{ah(l,!1,d=>{s[u]=d,++o===n&&e(s.join(Nx))})})},aA=(t,e)=>{const n=t.split(Nx),s=[];for(let o=0;o{const s=n.length;let o;if(s<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,s);else if(s<65536){o=new Uint8Array(3);const l=new DataView(o.buffer);l.setUint8(0,126),l.setUint16(1,s)}else{o=new Uint8Array(9);const l=new DataView(o.buffer);l.setUint8(0,127),l.setBigUint64(1,BigInt(s))}t.data&&typeof t.data!="string"&&(o[0]|=128),e.enqueue(o),e.enqueue(n)})}})}let Ed;function Tl(t){return t.reduce((e,n)=>e+n.length,0)}function _l(t,e){if(t[0].length===e)return t.shift();const n=new Uint8Array(e);let s=0;for(let o=0;oMath.pow(2,21)-1){d.enqueue(pf);break}o=g*Math.pow(2,32)+p.getUint32(4),s=3}else{if(Tl(n)t){d.enqueue(pf);break}}}})}const Dx=4;function tt(t){if(t)return cA(t)}function cA(t){for(var e in tt.prototype)t[e]=tt.prototype[e];return t}tt.prototype.on=tt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};tt.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this};tt.prototype.off=tt.prototype.removeListener=tt.prototype.removeAllListeners=tt.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var s,o=0;oPromise.resolve().then(e):(e,n)=>n(e,0),ln=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),dA="arraybuffer";function Lx(t,...e){return e.reduce((n,s)=>(t.hasOwnProperty(s)&&(n[s]=t[s]),n),{})}const fA=ln.setTimeout,hA=ln.clearTimeout;function du(t,e){e.useNativeTimers?(t.setTimeoutFn=fA.bind(ln),t.clearTimeoutFn=hA.bind(ln)):(t.setTimeoutFn=ln.setTimeout.bind(ln),t.clearTimeoutFn=ln.clearTimeout.bind(ln))}const pA=1.33;function mA(t){return typeof t=="string"?gA(t):Math.ceil((t.byteLength||t.size)*pA)}function gA(t){let e=0,n=0;for(let s=0,o=t.length;s=57344?n+=3:(s++,n+=4);return n}function Mx(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function yA(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function vA(t){let e={},n=t.split("&");for(let s=0,o=n.length;s{this.readyState="paused",e()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||n()})),this.writable||(s++,this.once("drain",function(){--s||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const n=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};aA(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,oA(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Mx()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}}let Ix=!1;try{Ix=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const SA=Ix;function bA(){}class EA extends xA{constructor(e){if(super(e),typeof location<"u"){const n=location.protocol==="https:";let s=location.port;s||(s=n?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||s!==e.port}}doWrite(e,n){const s=this.request({method:"POST",data:e});s.on("success",n),s.on("error",(o,l)=>{this.onError("xhr post error",o,l)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,s)=>{this.onError("xhr poll error",n,s)}),this.pollXhr=e}}class Nn extends tt{constructor(e,n,s){super(),this.createRequest=e,du(this,s),this._opts=s,this._method=s.method||"GET",this._uri=n,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var e;const n=Lx(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(n);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&s.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var o;s.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=Nn.requestsCount++,Nn.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=bA,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Nn.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Nn.requestsCount=0;Nn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",sv);else if(typeof addEventListener=="function"){const t="onpagehide"in ln?"pagehide":"unload";addEventListener(t,sv,!1)}}function sv(){for(let t in Nn.requests)Nn.requests.hasOwnProperty(t)&&Nn.requests[t].abort()}const TA=(function(){const t=jx({xdomain:!1});return t&&t.responseType!==null})();class _A extends EA{constructor(e){super(e);const n=e&&e.forceBase64;this.supportsBinary=TA&&!n}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Nn(jx,this.uri(),e)}}function jx(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||SA))return new XMLHttpRequest}catch{}if(!e)try{return new ln[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Fx=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class CA extends uh{get name(){return"websocket"}doOpen(){const e=this.uri(),n=this.opts.protocols,s=Fx?{}:Lx(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,n,s)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n{try{this.doWrite(s,l)}catch{}o&&cu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Mx()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}}const Td=ln.WebSocket||ln.MozWebSocket;class kA extends CA{createSocket(e,n,s){return Fx?new Td(e,n,s):n?new Td(e,n):new Td(e)}doWrite(e,n){this.ws.send(n)}}class RA extends uh{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const n=uA(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=e.readable.pipeThrough(n).getReader(),o=lA();o.readable.pipeTo(e.writable),this._writer=o.writable.getWriter();const l=()=>{s.read().then(({done:d,value:f})=>{d||(this.onPacket(f),l())}).catch(d=>{})};l();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let n=0;n{o&&cu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const PA={websocket:kA,webtransport:RA,polling:_A},AA=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,OA=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function mf(t){if(t.length>8e3)throw"URI too long";const e=t,n=t.indexOf("["),s=t.indexOf("]");n!=-1&&s!=-1&&(t=t.substring(0,n)+t.substring(n,s).replace(/:/g,";")+t.substring(s,t.length));let o=AA.exec(t||""),l={},u=14;for(;u--;)l[OA[u]]=o[u]||"";return n!=-1&&s!=-1&&(l.source=e,l.host=l.host.substring(1,l.host.length-1).replace(/;/g,":"),l.authority=l.authority.replace("[","").replace("]","").replace(/;/g,":"),l.ipv6uri=!0),l.pathNames=NA(l,l.path),l.queryKey=DA(l,l.query),l}function NA(t,e){const n=/\/{2,9}/g,s=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&s.splice(0,1),e.slice(-1)=="/"&&s.splice(s.length-1,1),s}function DA(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,o,l){o&&(n[o]=l)}),n}const gf=typeof addEventListener=="function"&&typeof removeEventListener=="function",Il=[];gf&&addEventListener("offline",()=>{Il.forEach(t=>t())},!1);class jr extends tt{constructor(e,n){if(super(),this.binaryType=dA,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(n=e,e=null),e){const s=mf(e);n.hostname=s.host,n.secure=s.protocol==="https"||s.protocol==="wss",n.port=s.port,s.query&&(n.query=s.query)}else n.host&&(n.hostname=mf(n.host).host);du(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(s=>{const o=s.prototype.name;this.transports.push(o),this._transportsByName[o]=s}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=vA(this.opts.query)),gf&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Il.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const n=Object.assign({},this.opts.query);n.EIO=Dx,n.transport=e,this.id&&(n.sid=this.id);const s=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&jr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(e);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",jr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=e.data,this._onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let s=0;s0&&n>this._maxPayload)return this.writeBuffer.slice(0,s);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,cu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,n,s){return this._sendPacket("message",e,n,s),this}send(e,n,s){return this._sendPacket("message",e,n,s),this}_sendPacket(e,n,s,o){if(typeof n=="function"&&(o=n,n=void 0),typeof s=="function"&&(o=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const l={type:e,data:n,options:s};this.emitReserved("packetCreate",l),this.writeBuffer.push(l),o&&this.once("flush",o),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},s=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():e()}):this.upgrading?s():e()),this}_onError(e){if(jr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),gf&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=Il.indexOf(this._offlineEventListener);s!==-1&&Il.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this._prevBufferLen=0}}}jr.protocol=Dx;class LA extends jr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e{s||(n.send([{type:"ping",data:"probe"}]),n.once("packet",y=>{if(!s)if(y.type==="pong"&&y.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;jr.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(g(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const w=new Error("probe error");w.transport=n.name,this.emitReserved("upgradeError",w)}}))};function l(){s||(s=!0,g(),n.close(),n=null)}const u=y=>{const w=new Error("probe error: "+y);w.transport=n.name,l(),this.emitReserved("upgradeError",w)};function d(){u("transport closed")}function f(){u("socket closed")}function p(y){n&&y.name!==n.name&&l()}const g=()=>{n.removeListener("open",o),n.removeListener("error",u),n.removeListener("close",d),this.off("close",f),this.off("upgrading",p)};n.once("open",o),n.once("error",u),n.once("close",d),this.once("close",f),this.once("upgrading",p),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{s||n.open()},200):n.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const n=[];for(let s=0;sPA[l]).filter(l=>!!l)),super(s?o:e,o)}};function IA(t,e="",n){let s=t;n=n||typeof location<"u"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n<"u"?t=n.protocol+"//"+t:t="https://"+t),s=mf(t)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const l=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+l+":"+s.port+e,s.href=s.protocol+"://"+l+(n&&n.port===s.port?"":":"+s.port),s}const jA=typeof ArrayBuffer=="function",FA=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Bx=Object.prototype.toString,BA=typeof Blob=="function"||typeof Blob<"u"&&Bx.call(Blob)==="[object BlobConstructor]",UA=typeof File=="function"||typeof File<"u"&&Bx.call(File)==="[object FileConstructor]";function ch(t){return jA&&(t instanceof ArrayBuffer||FA(t))||BA&&t instanceof Blob||UA&&t instanceof File}function jl(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,s=t.length;n=0&&t.numthis.opts.maxAttachments)throw new Error("too many attachments");s.attachments=d}if(e.charAt(n+1)==="/"){const l=n+1;for(;++n&&!(e.charAt(n)===","||n===e.length););s.nsp=e.substring(l,n)}else s.nsp="/";const o=e.charAt(n+1);if(o!==""&&Number(o)==o){const l=n+1;for(;++n;){const u=e.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===e.length)break}s.id=Number(e.substring(l,n+1))}if(e.charAt(++n)){const l=this.tryParse(e.substr(n));if(dh.isPayloadValid(s.type,l))s.data=l;else throw new Error("invalid payload")}return s}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,n){switch(e){case Ne.CONNECT:return iv(n);case Ne.DISCONNECT:return n===void 0;case Ne.CONNECT_ERROR:return typeof n=="string"||iv(n);case Ne.EVENT:case Ne.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&$A.indexOf(n[0])===-1);case Ne.ACK:case Ne.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class HA{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const n=zA(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const qA=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};function iv(t){return Object.prototype.toString.call(t)==="[object Object]"}const KA=Object.freeze(Object.defineProperty({__proto__:null,Decoder:dh,Encoder:WA,get PacketType(){return Ne}},Symbol.toStringTag,{value:"Module"}));function bn(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const QA=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Ux extends tt{constructor(e,n,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=n,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[bn(e,"open",this.onopen.bind(this)),bn(e,"packet",this.onpacket.bind(this)),bn(e,"error",this.onerror.bind(this)),bn(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){var s,o,l;if(QA.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type:Ne.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const g=this.ids++,y=n.pop();this._registerAckCallback(g,y),u.id=g}const d=(o=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||o===void 0?void 0:o.writable,f=this.connected&&!(!((l=this.io.engine)===null||l===void 0)&&l._hasPingExpired());return this.flags.volatile&&!d||(f?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(e,n){var s;const o=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(o===void 0){this.acks[e]=n;return}const l=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let d=0;d{this.io.clearTimeoutFn(l),n.apply(this,d)};u.withError=!0,this.acks[e]=u}emitWithAck(e,...n){return new Promise((s,o)=>{const l=(u,d)=>u?o(u):s(d);l.withError=!0,n.push(l),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((o,...l)=>(this._queue[0],o!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...l)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Ne.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(s=>String(s.id)===e)){const s=this.acks[e];delete this.acks[e],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Ne.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ne.EVENT:case Ne.BINARY_EVENT:this.onevent(e);break;case Ne.ACK:case Ne.BINARY_ACK:this.onack(e);break;case Ne.DISCONNECT:this.ondisconnect();break;case Ne.CONNECT_ERROR:this.destroy();const s=new Error(e.data.message);s.data=e.data.data,this.emitReserved("connect_error",s);break}}onevent(e){const n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const s of n)s.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const n=this;let s=!1;return function(...o){s||(s=!0,n.packet({type:Ne.ACK,id:e,data:o}))}}onack(e){const n=this.acks[e.id];typeof n=="function"&&(delete this.acks[e.id],n.withError&&e.data.unshift(null),n.apply(this,e.data))}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ne.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const n=this._anyListeners;for(let s=0;s0&&t.jitter<=1?t.jitter:0,this.attempts=0}Ri.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-n:t+n}return Math.min(t,this.max)|0};Ri.prototype.reset=function(){this.attempts=0};Ri.prototype.setMin=function(t){this.ms=t};Ri.prototype.setMax=function(t){this.max=t};Ri.prototype.setJitter=function(t){this.jitter=t};class wf extends tt{constructor(e,n){var s;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,du(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((s=n.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new Ri({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;const o=n.parser||KA;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new MA(this.uri,this.opts);const n=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const o=bn(n,"open",function(){s.onopen(),e&&e()}),l=d=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",d),e?e(d):this.maybeReconnectOnOpen()},u=bn(n,"error",l);if(this._timeout!==!1){const d=this._timeout,f=this.setTimeoutFn(()=>{o(),l(new Error("timeout")),n.close()},d);this.opts.autoUnref&&f.unref(),this.subs.push(()=>{this.clearTimeoutFn(f)})}return this.subs.push(o),this.subs.push(u),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(bn(e,"ping",this.onping.bind(this)),bn(e,"data",this.ondata.bind(this)),bn(e,"error",this.onerror.bind(this)),bn(e,"close",this.onclose.bind(this)),bn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){cu(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let s=this.nsps[e];return s?this._autoConnect&&!s.active&&s.connect():(s=new Ux(this,e,n),this.nsps[e]=s),s}_destroy(e){const n=Object.keys(this.nsps);for(const s of n)if(this.nsps[s].active)return;this._close()}_packet(e){const n=this.encoder.encode(e);for(let s=0;se()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,n){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(o=>{o?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",o)):e.onreconnect()}))},n);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const xo={};function Fl(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=IA(t,e.path||"/socket.io"),s=n.source,o=n.id,l=n.path,u=xo[o]&&l in xo[o].nsps,d=e.forceNew||e["force new connection"]||e.multiplex===!1||u;let f;return d?f=new wf(s,e):(xo[o]||(xo[o]=new wf(s,e)),f=xo[o]),n.query&&!e.query&&(e.query=n.queryKey),f.socket(n.path,e)}Object.assign(Fl,{Manager:wf,Socket:Ux,io:Fl,connect:Fl});const GA=250;function ov(t,e){var n;const s=(n=t.token)!==null&&n!==void 0?n:bs(),o={app_id:t.appId,token:s};s||(o.anonymous_id=Gl());const l=Fl(t.serverUrl,{path:t.mountPath,transports:t.transports,query:o});return l.on("connect",async()=>{var u;return console.log("connect",l.id),(u=e.connect)===null||u===void 0?void 0:u.call(e)}),l.on("update_model",async u=>{var d;return(d=e.update_model)===null||d===void 0?void 0:d.call(e,u)}),l.on("error",async u=>{var d;return(d=e.error)===null||d===void 0?void 0:d.call(e,u)}),l.on("connect_error",async u=>{var d;return console.error("connect_error",u),(d=e.error)===null||d===void 0?void 0:d.call(e,u)}),l}function XA({config:t}){let e={...t};const n={},s={},o={connect:async()=>{const S=[];Object.keys(n).forEach(P=>{const k=w(P);k.length!==0&&(p(P),k.forEach(({connect:A})=>{const F=async()=>A==null?void 0:A();S.push(F())}))}),await Promise.all(S)},update_model:async S=>{const k=w(S.room).map(A=>{var F;return(F=A.update_model)===null||F===void 0?void 0:F.call(A,S)});await Promise.all(k)},error:async S=>{console.error("error",S);const P=Object.values(n).flat().map(k=>{var A;return(A=k.error)===null||A===void 0?void 0:A.call(k,S)});await Promise.all(P)}};let l=ov(t,o);function u(){d()}function d(){R(),l&&l.disconnect()}function f(S){u(),e={...e,...S},l=ov(e,o)}function p(S){l.emit("join",S)}function g(S){l.emit("leave",S)}async function y(S,P){var k;const A=JSON.stringify(P);return(k=o.update_model)===null||k===void 0?void 0:k.call(o,{room:S,data:A})}function w(S){var P;return(P=n[S])!==null&&P!==void 0?P:[]}function E(S){const P=s[S];P&&(clearTimeout(P),delete s[S])}function R(){Object.keys(s).forEach(S=>{var P,k;clearTimeout(s[S]),delete s[S],((k=(P=n[S])===null||P===void 0?void 0:P.length)!==null&&k!==void 0?k:0)===0&&delete n[S]})}function b(S){E(S),s[S]=setTimeout(()=>{var P,k;delete s[S],!(((k=(P=n[S])===null||P===void 0?void 0:P.length)!==null&&k!==void 0?k:0)>0)&&(g(S),delete n[S])},GA)}return{socket:l,subscribeToRoom:(S,P)=>{n[S]?E(S):(p(S),n[S]=[]),n[S].push(P);let k=!1;return()=>{var A,F;k||(k=!0,n[S]=(F=(A=n[S])===null||A===void 0?void 0:A.filter(V=>V!==P))!==null&&F!==void 0?F:[],n[S].length===0&&b(S))}},updateConfig:f,updateModel:y,disconnect:d}}(!globalThis.EventTarget||!globalThis.Event)&&console.error(` PartySocket requires a global 'EventTarget' class to be available! You can polyfill this global by adding this to your code before any partysocket imports: \`\`\` import 'partysocket/event-target-polyfill'; \`\`\` Please file an issue at https://github.com/partykit/partykit if you're still having trouble. `);var Vx=class extends Event{constructor(e,n){super("error",n);Me(this,"message");Me(this,"error");this.message=e.message,this.error=e}},zx=class extends Event{constructor(e=1e3,n="",s){super("close",s);Me(this,"code");Me(this,"reason");Me(this,"wasClean",!0);this.code=e,this.reason=n}},_d={Event,ErrorEvent:Vx,CloseEvent:zx};function YA(t,e){if(!t)throw new Error(e)}function JA(t){return new t.constructor(t.type,t)}function ZA(t){return"data"in t?new MessageEvent(t.type,t):"code"in t||"reason"in t?new zx(t.code||1999,t.reason||"unknown reason",t):"error"in t?new Vx(t.error,t):new Event(t.type,t)}var I0,eO=typeof process<"u"&&typeof((I0=process.versions)==null?void 0:I0.node)<"u"&&typeof document>"u",Cl=eO?ZA:JA,ss={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},av=!1,tO=class os extends EventTarget{constructor(n,s,o={}){super();Me(this,"_ws");Me(this,"_retryCount",-1);Me(this,"_uptimeTimeout");Me(this,"_connectTimeout");Me(this,"_shouldReconnect",!0);Me(this,"_connectLock",!1);Me(this,"_binaryType","blob");Me(this,"_closeCalled",!1);Me(this,"_messageQueue",[]);Me(this,"_url");Me(this,"_protocols");Me(this,"_options");Me(this,"onclose",null);Me(this,"onerror",null);Me(this,"onmessage",null);Me(this,"onopen",null);Me(this,"_handleOpen",n=>{this._debug("open event");const{minUptime:s=ss.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),s),YA(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(o=>{var l;return(l=this._ws)==null?void 0:l.send(o)}),this._messageQueue=[],this.onopen&&this.onopen(n),this.dispatchEvent(Cl(n))});Me(this,"_handleMessage",n=>{this._debug("message event"),this.onmessage&&this.onmessage(n),this.dispatchEvent(Cl(n))});Me(this,"_handleError",n=>{this._debug("error event",n.message),this._disconnect(void 0,n.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(n),this._debug("exec error listeners"),this.dispatchEvent(Cl(n)),this._connect()});Me(this,"_handleClose",n=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(n),this.dispatchEvent(Cl(n))});this._url=n,this._protocols=s,this._options=o,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return os.CONNECTING}get OPEN(){return os.OPEN}get CLOSING(){return os.CLOSING}get CLOSED(){return os.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(n){this._binaryType=n,this._ws&&(this._ws.binaryType=n)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((s,o)=>(typeof o=="string"?s+=o.length:o instanceof Blob?s+=o.size:s+=o.byteLength,s),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?os.CLOSED:os.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(n=1e3,s){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(n,s)}reconnect(n,s){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(n,s),this._connect())}send(n){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",n),this._ws.send(n);else{const{maxEnqueuedMessages:s=ss.maxEnqueuedMessages}=this._options;this._messageQueue.length",...n])}_getNextDelay(){const{reconnectionDelayGrowFactor:n=ss.reconnectionDelayGrowFactor,minReconnectionDelay:s=ss.minReconnectionDelay,maxReconnectionDelay:o=ss.maxReconnectionDelay}=this._options;let l=0;return this._retryCount>0&&(l=s*Math.pow(n,this._retryCount-1),l>o&&(l=o)),this._debug("next delay",l),l}_wait(){return new Promise(n=>{setTimeout(n,this._getNextDelay())})}_getNextProtocols(n){if(!n)return Promise.resolve(null);if(typeof n=="string"||Array.isArray(n))return Promise.resolve(n);if(typeof n=="function"){const s=n();if(!s)return Promise.resolve(null);if(typeof s=="string"||Array.isArray(s))return Promise.resolve(s);if(s.then)return s}throw Error("Invalid protocols")}_getNextUrl(n){if(typeof n=="string")return Promise.resolve(n);if(typeof n=="function"){const s=n();if(typeof s=="string")return Promise.resolve(s);if(s.then)return s}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;const{maxRetries:n=ss.maxRetries,connectionTimeout:s=ss.connectionTimeout}=this._options;if(this._retryCount>=n){this._debug("max retries reached",this._retryCount,">=",n);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([o,l])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!av&&(console.error(`‼️ No WebSocket implementation available. You should define options.WebSocket. For example, if you're using node.js, run \`npm install ws\`, and then in your code: import PartySocket from 'partysocket'; import WS from 'ws'; const partysocket = new PartySocket({ host: "127.0.0.1:1999", room: "test-room", WebSocket: WS }); `),av=!0);const u=this._options.WebSocket||WebSocket;this._debug("connect",{url:o,protocols:l}),this._ws=l?new u(o,l):new u(o),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),s)}).catch(o=>{this._connectLock=!1,this._handleError(new _d.ErrorEvent(Error(o.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new _d.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(n=1e3,s){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(n,s),this._handleClose(new _d.CloseEvent(n,s,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};/*! * Reconnecting WebSocket * by Pedro Ladaria * https://github.com/pladaria/reconnecting-websocket * License MIT */var nO=t=>t[1]!==null&&t[1]!==void 0;function rO(){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();let t=new Date().getTime(),e=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){let s=Math.random()*16;return t>0?(s=(t+s)%16|0,t=Math.floor(t/16)):(s=(e+s)%16|0,e=Math.floor(e/16)),(n==="x"?s:s&3|8).toString(16)})}function $x(t,e,n={}){const{host:s,path:o,protocol:l,room:u,party:d,query:f}=t;let p=s.replace(/^(http|https|ws|wss):\/\//,"");if(p.endsWith("/")&&(p=p.slice(0,-1)),o&&o.startsWith("/"))throw new Error("path must not start with a slash");const g=d??"main",y=o?`/${o}`:"",w=l||(p.startsWith("localhost:")||p.startsWith("127.0.0.1:")||p.startsWith("192.168.")||p.startsWith("10.")||p.startsWith("172.")&&p.split(".")[1]>="16"&&p.split(".")[1]<="31"||p.startsWith("[::ffff:7f00:1]:")?e:e+"s"),E=`${w}://${p}/${d?`parties/${d}`:"party"}/${u}${y}`,R=(x={})=>`${E}?${new URLSearchParams([...Object.entries(n),...Object.entries(x).filter(nO)])}`,b=typeof f=="function"?async()=>R(await f()):R(f);return{host:p,path:y,room:u,name:g,protocol:w,partyUrl:E,urlProvider:b}}var sO=class extends tO{constructor(e){const n=lv(e);super(n.urlProvider,n.protocols,n.socketOptions);Me(this,"_pk");Me(this,"_pkurl");Me(this,"name");Me(this,"room");Me(this,"host");Me(this,"path");this.partySocketOptions=e,this.setWSProperties(n)}updateProperties(e){const n=lv({...e,host:e.host??this.host,room:e.room??this.room,path:e.path??this.path});this._url=n.urlProvider,this._protocols=n.protocols,this._options=n.socketOptions,this.setWSProperties(n)}setWSProperties(e){const{_pk:n,_pkurl:s,name:o,room:l,host:u,path:d}=e;this._pk=n,this._pkurl=s,this.name=o,this.room=l,this.host=u,this.path=d}reconnect(e,n){if(!this.room||!this.host)throw new Error("The room and host must be set before connecting, use `updateProperties` method to set them or pass them to the constructor.");super.reconnect(e,n)}get id(){return this._pk}get roomUrl(){return this._pkurl}static async fetch(e,n){const s=$x(e,"http"),o=typeof s.urlProvider=="string"?s.urlProvider:await s.urlProvider();return(e.fetch??fetch)(o,n)}};function lv(t){const{id:e,host:n,path:s,party:o,room:l,protocol:u,query:d,protocols:f,...p}=t,g=e||rO(),y=$x(t,"ws",{_pk:g});return{_pk:g,_pkurl:y.partyUrl,name:y.name,room:y.room,host:y.host,path:y.path,protocols:f,socketOptions:p,urlProvider:y.urlProvider}}const iO=1e3,oO=3e3;class aO{constructor(e,n,s,o,l){var u;this.onClose=l,this.listeners=new Set,this.heartbeat=null,this.id=(u=o==null?void 0:o.id)!==null&&u!==void 0?u:crypto.randomUUID();const d=new sO({host:s.host,party:e,room:n,id:this.id,query:()=>{const g=s.getAuthToken();return{app_id:s.appId,handler:e,...g?{token:g}:{},...s.functionsVersion?{fv:s.functionsVersion}:{}}}});this.ws=d;let f=Date.now();const p=()=>{f=Date.now()};d.addEventListener("open",p),d.addEventListener("message",g=>{p();let y;try{y=JSON.parse(g.data)}catch{return}if((y&&typeof y=="object"?y.type:void 0)!=="__pong")for(const E of this.listeners)E(y)}),this.heartbeat=setInterval(()=>{if(Date.now()-f>oO){p(),d.reconnect();return}try{d.send(JSON.stringify({type:"__ping"}))}catch{}},iO)}subscribe(e){return this.listeners.add(e),{unsubscribe:()=>{this.listeners.delete(e)}}}send(e){this.ws.send(JSON.stringify(e))}close(){this.heartbeat&&(clearInterval(this.heartbeat),this.heartbeat=null),this.listeners.clear(),this.ws.close(),this.onClose()}}function lO(t,e,n,s){let o=null;return{connect(l){if(o)return o;const u=new aO(t,e,n,l,()=>{s.delete(u),o===u&&(o=null)});return o=u,s.add(u),u}}}function uO(t,e){return t&&!t.startsWith("/")?t:e??t}function cO(t){const e=new Set;return{module:new Proxy({},{get(s,o){if(!(typeof o!="string"||o==="then"))return l=>lO(o,l,t,e)}}),closeAll:()=>{for(const s of[...e])s.close()}}}function dO(t){var e,n,s;const{serverUrl:o="https://base44.app",appId:l,token:u,serviceToken:d,requiresAuth:f=!1,appBaseUrl:p,options:g,functionsVersion:y,headers:w}=t,E=typeof p=="string"?p:"",R={serverUrl:o,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:l,token:u};let b=null;const x=()=>(b||(b=XA({config:R})),b),S={...w,"X-App-Id":String(l)},P=y?{...S,"Base44-Functions-Version":y}:S,k=To({baseURL:`${o}/api`,headers:S,token:u,onError:g==null?void 0:g.onError}),A=To({baseURL:`${o}/api`,headers:P,token:u,interceptResponses:!1,onError:g==null?void 0:g.onError}),F={...S,...u?{"on-behalf-of":`Bearer ${u}`}:{}},V=To({baseURL:`${o}/api`,headers:F,token:d,onError:g==null?void 0:g.onError}),q=To({baseURL:`${o}/api`,headers:P,token:d,interceptResponses:!1}),B=QP(k,A,l,{appBaseUrl:E,token:u});if(typeof window<"u"){const Se=u||bs();Se&&B.setToken(Se)}const Y=cO({appId:l,host:uO(o,typeof window<"u"?(e=window.location)===null||e===void 0?void 0:e.origin:void 0),functionsVersion:y,getAuthToken:()=>u||bs()}),ne={entities:Gy({axios:k,appId:l,getSocket:x}),integrations:Xy(k,l),connectors:ZP(k,l),auth:B,functions:Yy(A,l,{getAuthHeaders:()=>{const Se={},Z=u||bs();return Z&&(Se.Authorization=`Bearer ${Z}`),Se},baseURL:(n=A.defaults)===null||n===void 0?void 0:n.baseURL}),agents:Jy({axios:k,getSocket:x,appId:l,serverUrl:o,token:u}),aiGateway:Zy({serverUrl:o,token:u,appId:l}),appLogs:ev(k,l),users:tA(k,l),analytics:LP({axiosClient:k,serverUrl:o,appId:l,userAuthModule:B}),actors:Y.module,cleanup:()=>{ne.analytics.cleanup(),Y.closeAll(),b&&b.disconnect()}},ve={entities:Gy({axios:V,appId:l,getSocket:x}),integrations:Xy(V,l),sso:GP(V,l),connectors:YP(V,l),functions:Yy(q,l,{getAuthHeaders:()=>{const Se={};return d&&(Se.Authorization=`Bearer ${d}`),Se},baseURL:(s=q.defaults)===null||s===void 0?void 0:s.baseURL}),agents:Jy({axios:V,getSocket:x,appId:l,serverUrl:o,token:u}),aiGateway:Zy({serverUrl:o,token:d,appId:l}),appLogs:ev(V,l),cleanup:()=>{b&&b.disconnect()}};return f&&typeof window<"u"&&setTimeout(async()=>{try{await ne.auth.isAuthenticated()||ne.auth.redirectToLogin(window.location.href)}catch(Se){console.error("Authentication check failed:",Se),ne.auth.redirectToLogin(window.location.href)}},0),{...ne,setToken(Se){ne.auth.setToken(Se),b&&b.updateConfig({token:Se}),R.token=Se},getConfig(){return{serverUrl:o,appId:l,requiresAuth:f}},get asServiceRole(){if(!d)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return ve}}}const Wx=typeof window>"u",fO=Wx?{localStorage:new Map}:window,No=fO.localStorage,hO=t=>t.replace(/([A-Z])/g,"_$1").toLowerCase(),ni=(t,{defaultValue:e=void 0,removeFromUrl:n=!1}={})=>{if(Wx)return e;const s=`base44_${hO(t)}`,o=new URLSearchParams(window.location.search),l=o.get(t);if(n){o.delete(t);const d=`${window.location.pathname}${o.toString()?`?${o.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,d)}if(l)return No.setItem(s,l),l;if(e)return No.setItem(s,e),e;const u=No.getItem(s);return u||null},pO=()=>(ni("clear_access_token")==="true"&&(No.removeItem("base44_access_token"),No.removeItem("token")),{appId:ni("app_id",{defaultValue:"6a92af5fef1a1c70ffdacb6b"}),token:ni("access_token",{removeFromUrl:!0}),fromUrl:ni("from_url",{defaultValue:window.location.href}),functionsVersion:ni("functions_version",{defaultValue:"prod"}),appBaseUrl:ni("app_base_url",{defaultValue:void 0})}),Co={...pO()},{appId:mO,token:gO,functionsVersion:yO,appBaseUrl:vO}=Co,ko=dO({appId:mO,token:gO,functionsVersion:yO,serverUrl:"",requiresAuth:!1,appBaseUrl:vO});function wO({}){var o;const e=Zf().pathname.substring(1),{data:n,isFetched:s}=NC({queryKey:["user"],queryFn:async()=>{try{return{user:await ko.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return T.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:T.jsx("div",{className:"max-w-md w-full",children:T.jsxs("div",{className:"text-center space-y-6",children:[T.jsxs("div",{className:"space-y-2",children:[T.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),T.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),T.jsxs("div",{className:"space-y-3",children:[T.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),T.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",T.jsxs("span",{className:"font-medium text-slate-700",children:['"',e,'"']})," could not be found in this application."]})]}),s&&n.isAuthenticated&&((o=n.user)==null?void 0:o.role)==="admin"&&T.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:T.jsxs("div",{className:"flex items-start space-x-3",children:[T.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:T.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),T.jsxs("div",{className:"text-left space-y-1",children:[T.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),T.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),T.jsx("div",{className:"pt-6",children:T.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[T.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:T.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const Hx=_.createContext(),xO=({children:t})=>{const[e,n]=_.useState(null),[s,o]=_.useState(!1),[l,u]=_.useState(!0),[d,f]=_.useState(!0),[p,g]=_.useState(null),[y,w]=_.useState(!1),[E,R]=_.useState(null);_.useEffect(()=>{b()},[]);const b=async()=>{var k,A;try{f(!0),g(null);const F=To({baseURL:"/api/apps/public",headers:{"X-App-Id":Co.appId},token:Co.token,interceptResponses:!0});try{const V=await F.get(`/prod/public-settings/by-id/${Co.appId}`);R(V),Co.token?await x():(u(!1),o(!1),w(!0)),f(!1)}catch(V){if(console.error("App state check failed:",V),V.status===403&&((A=(k=V.data)==null?void 0:k.extra_data)!=null&&A.reason)){const q=V.data.extra_data.reason;g(q==="auth_required"?{type:"auth_required",message:"Authentication required"}:q==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:q,message:V.message})}else g({type:"unknown",message:V.message||"Failed to load app"});f(!1),u(!1)}}catch(F){console.error("Unexpected error:",F),g({type:"unknown",message:F.message||"An unexpected error occurred"}),f(!1),u(!1)}},x=async()=>{try{u(!0);const k=await ko.auth.me();n(k),o(!0),u(!1),w(!0)}catch(k){console.error("User auth check failed:",k),u(!1),o(!1),w(!0),(k.status===401||k.status===403)&&g({type:"auth_required",message:"Authentication required"})}},S=(k=!0)=>{n(null),o(!1),k?ko.auth.logout(window.location.href):ko.auth.logout()},P=()=>{ko.auth.redirectToLogin(window.location.href)};return T.jsx(Hx.Provider,{value:{user:e,isAuthenticated:s,isLoadingAuth:l,isLoadingPublicSettings:d,authError:p,appPublicSettings:E,authChecked:y,logout:S,navigateToLogin:P,checkUserAuth:x,checkAppState:b},children:t})},SO=()=>{const t=_.useContext(Hx);if(!t)throw new Error("useAuth must be used within an AuthProvider");return t},bO=()=>T.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:T.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:T.jsxs("div",{className:"text-center",children:[T.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:T.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:T.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),T.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),T.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),T.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[T.jsx("p",{children:"If you believe this is an error, you can:"}),T.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[T.jsx("li",{children:"Verify you are logged in with the correct account"}),T.jsx("li",{children:"Contact the app administrator for access"}),T.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),EO=t=>{const e=t.slice(1);try{return decodeURIComponent(e)}catch{return e}};function TO(){const{pathname:t,hash:e}=Zf(),n=sk();return _.useEffect(()=>{if(n!=="POP"){if(e){const s=EO(e),o=window.setTimeout(()=>{var l;(l=document.getElementById(s))==null||l.scrollIntoView({behavior:"smooth"})},50);return()=>window.clearTimeout(o)}window.scrollTo({top:0,left:0,behavior:"instant"})}},[t,e,n]),null}const uv=[{label:"About Us",href:"#"},{label:"Our Businesses",href:"/our-businesses/debt-capital",active:!0},{label:"Investor Relations",href:"#"},{label:"Governance",href:"#"},{label:"Contact",href:"#"}];function _O(){const[t,e]=_.useState(!1),[n,s]=_.useState(!1);return _.useEffect(()=>{const o=()=>e(window.scrollY>100);return o(),window.addEventListener("scroll",o,{passive:!0}),()=>window.removeEventListener("scroll",o)},[]),T.jsxs("header",{style:{position:"fixed",top:0,left:0,right:0,zIndex:1e3,height:72,transition:"background 300ms ease, border-color 300ms ease",background:t?"rgba(26,26,26,0.95)":"transparent",backdropFilter:t?"blur(8px)":"none",borderBottom:t?"1px solid rgba(255,255,255,0.1)":"1px solid transparent"},children:[T.jsxs("div",{className:"alrazah-container",style:{height:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[T.jsx("a",{href:"/","aria-label":"Alrazah Holding",style:{display:"inline-flex",alignItems:"center",height:28,color:"#fff",textDecoration:"none",fontWeight:500,letterSpacing:"0.02em",fontSize:20},children:"ALRAZAH"}),T.jsx("nav",{className:"desktop-nav",style:{display:"none"},children:uv.map(o=>T.jsx("a",{href:o.href,style:{color:o.active?"#fff":"rgba(255,255,255,0.8)",fontSize:14,letterSpacing:"0.02em",textDecoration:"none",paddingBottom:4,borderBottom:o.active?"2px solid #8D0034":"2px solid transparent",transition:"color 200ms ease"},onMouseEnter:l=>l.currentTarget.style.color="#fff",onMouseLeave:l=>l.currentTarget.style.color=o.active?"#fff":"rgba(255,255,255,0.8)",children:o.label},o.label))}),T.jsx("button",{className:"mobile-toggle",onClick:()=>s(!0),"aria-label":"Open menu",style:{display:"flex",background:"none",border:"none",cursor:"pointer",padding:0},children:T.jsx(WT,{size:24,color:"#fff",strokeWidth:2})})]}),n&&T.jsxs("div",{style:{position:"fixed",inset:0,background:"#1A1A1A",zIndex:1001,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:48},children:[T.jsx("button",{onClick:()=>s(!1),"aria-label":"Close menu",style:{position:"absolute",top:24,right:24,background:"none",border:"none",cursor:"pointer",padding:0},children:T.jsx(mw,{size:28,color:"#fff",strokeWidth:2})}),uv.map(o=>T.jsx("a",{href:o.href,onClick:()=>s(!1),className:"display-lg",style:{color:o.active?"#8D0034":"#fff",textDecoration:"none"},children:o.label},o.label))]}),T.jsx("style",{children:` @media (min-width: 1024px) { .desktop-nav { display: flex !important; gap: 32px; } .mobile-toggle { display: none !important; } } `})]})}const CO=["Real Estate","Logistics & Industrial","Asset Management","Project Management","Debt Capital","Agriculture","Oil & Gas","Hospitality","Energy"],kO=["About Us","Governance","Investor Relations","Sustainability","Careers","Contact"],RO=["Qatar Stock Exchange","Financial Statements","Annual Reports","Disclosure Notices","Privacy Policy"];function Cd({title:t,links:e}){return T.jsxs("div",{children:[T.jsx("div",{className:"caption",style:{color:"rgba(255,255,255,0.4)",textTransform:"uppercase",marginBottom:20},children:t}),T.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:12},children:e.map(n=>T.jsx("li",{children:T.jsx("a",{href:"#",className:"body-sm alrazah-link-underline",style:{color:"rgba(255,255,255,0.6)",textDecoration:"none",transition:"color 200ms ease"},onMouseEnter:s=>s.currentTarget.style.color="#fff",onMouseLeave:s=>s.currentTarget.style.color="rgba(255,255,255,0.6)",children:n})},n))})]})}function PO(){return T.jsxs("footer",{style:{background:"#1A1A1A",paddingTop:64,paddingBottom:32},children:[T.jsxs("div",{className:"alrazah-container",children:[T.jsxs("div",{className:"footer-grid",style:{display:"grid",gap:40},children:[T.jsx("div",{children:T.jsx("div",{style:{color:"#fff",fontWeight:500,fontSize:20,letterSpacing:"0.02em",height:32,display:"flex",alignItems:"center"},children:"ALRAZAH"})}),T.jsx(Cd,{title:"Our Businesses",links:CO}),T.jsx(Cd,{title:"Corporate",links:kO}),T.jsx(Cd,{title:"Regulatory",links:RO})]}),T.jsx("div",{style:{borderTop:"1px solid #333333",margin:"40px 0"}}),T.jsxs("div",{className:"footer-bottom",style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:8},children:[T.jsx("div",{className:"caption",style:{color:"rgba(255,255,255,0.4)"},children:"© 2026 Alrazah Holding Q.P.S.C. All rights reserved."}),T.jsx("div",{className:"caption",style:{color:"rgba(255,255,255,0.4)"},children:"Regulated by the Qatar Financial Markets Authority"})]})]}),T.jsx("style",{children:` @media (min-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr 1fr 1fr !important; } } @media (max-width: 767px) { .footer-bottom { flex-direction: column !important; text-align: center; } } `})]})}const qx=_.createContext({});function AO(t){const e=_.useRef(null);return e.current===null&&(e.current=t()),e.current}const fh=_.createContext(null),Kx=_.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function OO(t=!0){const e=_.useContext(fh);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:o}=e,l=_.useId();_.useEffect(()=>{t&&o(l)},[t]);const u=_.useCallback(()=>t&&s&&s(l),[l,s,t]);return!n&&s?[!1,u]:[!0]}const hh=typeof window<"u",NO=hh?_.useLayoutEffect:_.useEffect,qt=t=>t;let Qx=qt;function ph(t){let e;return()=>(e===void 0&&(e=t()),e)}const Ei=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},Jn=t=>t*1e3,Zn=t=>t/1e3,DO={useManualTiming:!1};function LO(t){let e=new Set,n=new Set,s=!1,o=!1;const l=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function d(p){l.has(p)&&(f.schedule(p),t()),p(u)}const f={schedule:(p,g=!1,y=!1)=>{const E=y&&s?e:n;return g&&l.add(p),E.has(p)||E.add(p),p},cancel:p=>{n.delete(p),l.delete(p)},process:p=>{if(u=p,s){o=!0;return}s=!0,[e,n]=[n,e],e.forEach(d),e.clear(),s=!1,o&&(o=!1,f.process(p))}};return f}const kl=["read","resolveKeyframes","update","preRender","render","postRender"],MO=40;function Gx(t,e){let n=!1,s=!0;const o={delta:0,timestamp:0,isProcessing:!1},l=()=>n=!0,u=kl.reduce((S,P)=>(S[P]=LO(l),S),{}),{read:d,resolveKeyframes:f,update:p,preRender:g,render:y,postRender:w}=u,E=()=>{const S=performance.now();n=!1,o.delta=s?1e3/60:Math.max(Math.min(S-o.timestamp,MO),1),o.timestamp=S,o.isProcessing=!0,d.process(o),f.process(o),p.process(o),g.process(o),y.process(o),w.process(o),o.isProcessing=!1,n&&e&&(s=!1,t(E))},R=()=>{n=!0,s=!0,o.isProcessing||t(E)};return{schedule:kl.reduce((S,P)=>{const k=u[P];return S[P]=(A,F=!1,V=!1)=>(n||R(),k.schedule(A,F,V)),S},{}),cancel:S=>{for(let P=0;Pcv[t].some(n=>!!e[n])};function IO(t){for(const e in t)Ti[e]={...Ti[e],...t[e]}}const jO=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Xl(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||jO.has(t)}let Yx=t=>!Xl(t);function FO(t){t&&(Yx=e=>e.startsWith("on")?!Xl(e):t(e))}try{FO(require("@emotion/is-prop-valid").default)}catch{}function BO(t,e,n){const s={};for(const o in t)o==="values"&&typeof t.values=="object"||(Yx(o)||n===!0&&Xl(o)||!e&&!Xl(o)||t.draggable&&o.startsWith("onDrag"))&&(s[o]=t[o]);return s}function UO(t){if(typeof Proxy>"u")return t;const e=new Map,n=(...s)=>t(...s);return new Proxy(n,{get:(s,o)=>o==="create"?t:(e.has(o)||e.set(o,t(o)),e.get(o))})}const fu=_.createContext({});function Vo(t){return typeof t=="string"||Array.isArray(t)}function hu(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const mh=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],gh=["initial",...mh];function pu(t){return hu(t.animate)||gh.some(e=>Vo(t[e]))}function Jx(t){return!!(pu(t)||t.variants)}function VO(t,e){if(pu(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Vo(n)?n:void 0,animate:Vo(s)?s:void 0}}return t.inherit!==!1?e:{}}function zO(t){const{initial:e,animate:n}=VO(t,_.useContext(fu));return _.useMemo(()=>({initial:e,animate:n}),[dv(e),dv(n)])}function dv(t){return Array.isArray(t)?t.join(" "):t}const $O=Symbol.for("motionComponentSymbol");function ri(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function WO(t,e,n){return _.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):ri(n)&&(n.current=s))},[e])}const yh=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),HO="framerAppearId",Zx="data-"+yh(HO),{schedule:vh}=Gx(queueMicrotask,!1),eS=_.createContext({});function qO(t,e,n,s,o){var l,u;const{visualElement:d}=_.useContext(fu),f=_.useContext(Xx),p=_.useContext(fh),g=_.useContext(Kx).reducedMotion,y=_.useRef(null);s=s||f.renderer,!y.current&&s&&(y.current=s(t,{visualState:e,parent:d,props:n,presenceContext:p,blockInitialAnimation:p?p.initial===!1:!1,reducedMotionConfig:g}));const w=y.current,E=_.useContext(eS);w&&!w.projection&&o&&(w.type==="html"||w.type==="svg")&&KO(y.current,n,o,E);const R=_.useRef(!1);_.useInsertionEffect(()=>{w&&R.current&&w.update(n,p)});const b=n[Zx],x=_.useRef(!!b&&!(!((l=window.MotionHandoffIsComplete)===null||l===void 0)&&l.call(window,b))&&((u=window.MotionHasOptimisedAnimation)===null||u===void 0?void 0:u.call(window,b)));return NO(()=>{w&&(R.current=!0,window.MotionIsMounted=!0,w.updateFeatures(),vh.render(w.render),x.current&&w.animationState&&w.animationState.animateChanges())}),_.useEffect(()=>{w&&(!x.current&&w.animationState&&w.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)===null||S===void 0||S.call(window,b)}),x.current=!1))}),w}function KO(t,e,n,s){const{layoutId:o,layout:l,drag:u,dragConstraints:d,layoutScroll:f,layoutRoot:p}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:tS(t.parent)),t.projection.setOptions({layoutId:o,layout:l,alwaysMeasureLayout:!!u||d&&ri(d),visualElement:t,animationType:typeof l=="string"?l:"both",initialPromotionConfig:s,layoutScroll:f,layoutRoot:p})}function tS(t){if(t)return t.options.allowProjection!==!1?t.projection:tS(t.parent)}function QO({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:o}){var l,u;t&&IO(t);function d(p,g){let y;const w={..._.useContext(Kx),...p,layoutId:GO(p)},{isStatic:E}=w,R=zO(p),b=s(p,E);if(!E&&hh){XO();const x=YO(w);y=x.MeasureLayout,R.visualElement=qO(o,b,w,e,x.ProjectionNode)}return T.jsxs(fu.Provider,{value:R,children:[y&&R.visualElement?T.jsx(y,{visualElement:R.visualElement,...w}):null,n(o,p,WO(b,R.visualElement,g),b,E,R.visualElement)]})}d.displayName=`motion.${typeof o=="string"?o:`create(${(u=(l=o.displayName)!==null&&l!==void 0?l:o.name)!==null&&u!==void 0?u:""})`}`;const f=_.forwardRef(d);return f[$O]=o,f}function GO({layoutId:t}){const e=_.useContext(qx).id;return e&&t!==void 0?e+"-"+t:t}function XO(t,e){_.useContext(Xx).strict}function YO(t){const{drag:e,layout:n}=Ti;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}const JO=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function wh(t){return typeof t!="string"||t.includes("-")?!1:!!(JO.indexOf(t)>-1||/[A-Z]/u.test(t))}function fv(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function xh(t,e,n,s){if(typeof e=="function"){const[o,l]=fv(s);e=e(n!==void 0?n:t.custom,o,l)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[o,l]=fv(s);e=e(n!==void 0?n:t.custom,o,l)}return e}const xf=t=>Array.isArray(t),ZO=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),eN=t=>xf(t)?t[t.length-1]||0:t,_t=t=>!!(t&&t.getVelocity);function Bl(t){const e=_t(t)?t.get():t;return ZO(e)?e.toValue():e}function tN({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:n},s,o,l){const u={latestValues:nN(s,o,l,t),renderState:e()};return n&&(u.onMount=d=>n({props:s,current:d,...u}),u.onUpdate=d=>n(d)),u}const nS=t=>(e,n)=>{const s=_.useContext(fu),o=_.useContext(fh),l=()=>tN(t,e,s,o);return n?l():AO(l)};function nN(t,e,n,s){const o={},l=s(t,{});for(const w in l)o[w]=Bl(l[w]);let{initial:u,animate:d}=t;const f=pu(t),p=Jx(t);e&&p&&!f&&t.inherit!==!1&&(u===void 0&&(u=e.initial),d===void 0&&(d=e.animate));let g=n?n.initial===!1:!1;g=g||u===!1;const y=g?d:u;if(y&&typeof y!="boolean"&&!hu(y)){const w=Array.isArray(y)?y:[y];for(let E=0;Ee=>typeof e=="string"&&e.startsWith(t),sS=rS("--"),rN=rS("var(--"),Sh=t=>rN(t)?sN.test(t.split("/*")[0].trim()):!1,sN=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,iS=(t,e)=>e&&typeof t=="number"?e.transform(t):t,er=(t,e,n)=>n>e?e:ntypeof t=="number",parse:parseFloat,transform:t=>t},zo={...Ai,transform:t=>er(0,1,t)},Rl={...Ai,default:1},sa=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Cr=sa("deg"),Dn=sa("%"),ye=sa("px"),iN=sa("vh"),oN=sa("vw"),hv={...Dn,parse:t=>Dn.parse(t)/100,transform:t=>Dn.transform(t*100)},aN={borderWidth:ye,borderTopWidth:ye,borderRightWidth:ye,borderBottomWidth:ye,borderLeftWidth:ye,borderRadius:ye,radius:ye,borderTopLeftRadius:ye,borderTopRightRadius:ye,borderBottomRightRadius:ye,borderBottomLeftRadius:ye,width:ye,maxWidth:ye,height:ye,maxHeight:ye,top:ye,right:ye,bottom:ye,left:ye,padding:ye,paddingTop:ye,paddingRight:ye,paddingBottom:ye,paddingLeft:ye,margin:ye,marginTop:ye,marginRight:ye,marginBottom:ye,marginLeft:ye,backgroundPositionX:ye,backgroundPositionY:ye},lN={rotate:Cr,rotateX:Cr,rotateY:Cr,rotateZ:Cr,scale:Rl,scaleX:Rl,scaleY:Rl,scaleZ:Rl,skew:Cr,skewX:Cr,skewY:Cr,distance:ye,translateX:ye,translateY:ye,translateZ:ye,x:ye,y:ye,z:ye,perspective:ye,transformPerspective:ye,opacity:zo,originX:hv,originY:hv,originZ:ye},pv={...Ai,transform:Math.round},bh={...aN,...lN,zIndex:pv,size:ye,fillOpacity:zo,strokeOpacity:zo,numOctaves:pv},uN={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},cN=Pi.length;function dN(t,e,n){let s="",o=!0;for(let l=0;l({style:{},transform:{},transformOrigin:{},vars:{}}),oS=()=>({..._h(),attrs:{}}),Ch=t=>typeof t=="string"&&t.toLowerCase()==="svg";function aS(t,{style:e,vars:n},s,o){Object.assign(t.style,e,o&&o.getProjectionStyles(s));for(const l in n)t.style.setProperty(l,n[l])}const lS=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function uS(t,e,n,s){aS(t,e,void 0,s);for(const o in e.attrs)t.setAttribute(lS.has(o)?o:yh(o),e.attrs[o])}const Yl={};function gN(t){Object.assign(Yl,t)}function cS(t,{layout:e,layoutId:n}){return As.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Yl[t]||t==="opacity")}function kh(t,e,n){var s;const{style:o}=t,l={};for(const u in o)(_t(o[u])||e.style&&_t(e.style[u])||cS(u,t)||((s=n==null?void 0:n.getValue(u))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(l[u]=o[u]);return l}function dS(t,e,n){const s=kh(t,e,n);for(const o in t)if(_t(t[o])||_t(e[o])){const l=Pi.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;s[l]=t[o]}return s}function yN(t,e){try{e.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{e.dimensions={x:0,y:0,width:0,height:0}}}const gv=["x","y","width","height","cx","cy","r"],vN={useVisualState:nS({scrapeMotionValuesFromProps:dS,createRenderState:oS,onUpdate:({props:t,prevProps:e,current:n,renderState:s,latestValues:o})=>{if(!n)return;let l=!!t.drag;if(!l){for(const d in o)if(As.has(d)){l=!0;break}}if(!l)return;let u=!e;if(e)for(let d=0;d{yN(n,s),ze.render(()=>{Th(s,o,Ch(n.tagName),t.transformTemplate),uS(n,s)})})}})},wN={useVisualState:nS({scrapeMotionValuesFromProps:kh,createRenderState:_h})};function fS(t,e,n){for(const s in e)!_t(e[s])&&!cS(s,n)&&(t[s]=e[s])}function xN({transformTemplate:t},e){return _.useMemo(()=>{const n=_h();return Eh(n,e,t),Object.assign({},n.vars,n.style)},[e])}function SN(t,e){const n=t.style||{},s={};return fS(s,n,t),Object.assign(s,xN(t,e)),s}function bN(t,e){const n={},s=SN(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}function EN(t,e,n,s){const o=_.useMemo(()=>{const l=oS();return Th(l,e,Ch(s),t.transformTemplate),{...l.attrs,style:{...l.style}}},[e]);if(t.style){const l={};fS(l,t.style,t),o.style={...l,...o.style}}return o}function TN(t=!1){return(n,s,o,{latestValues:l},u)=>{const f=(wh(n)?EN:bN)(s,l,u,n),p=BO(s,typeof n=="string",t),g=n!==_.Fragment?{...p,...f,ref:o}:{},{children:y}=s,w=_.useMemo(()=>_t(y)?y.get():y,[y]);return _.createElement(n,{...g,children:w})}}function _N(t,e){return function(s,{forwardMotionProps:o}={forwardMotionProps:!1}){const u={...wh(s)?vN:wN,preloadedFeatures:t,useRender:TN(o),createVisualElement:e,Component:s};return QO(u)}}function hS(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;swindow.ScrollTimeline!==void 0);class kN{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>"finished"in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,n){for(let s=0;s{if(CN()&&o.attachTimeline)return o.attachTimeline(e);if(typeof n=="function")return n(o)});return()=>{s.forEach((o,l)=>{o&&o(),this.animations[l].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let n=0;nn[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class RN extends kN{then(e,n){return Promise.all(this.animations).then(e).catch(n)}}function Rh(t,e){return t?t[e]||t.default||t:void 0}const Sf=2e4;function pS(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e=Sf?1/0:e}function Ph(t){return typeof t=="function"}function yv(t,e){t.timeline=e,t.onfinish=null}const Ah=t=>Array.isArray(t)&&typeof t[0]=="number",PN={linearEasing:void 0};function AN(t,e){const n=ph(t);return()=>{var s;return(s=PN[e])!==null&&s!==void 0?s:n()}}const Jl=AN(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),mS=(t,e,n=10)=>{let s="";const o=Math.max(Math.round(e/n),2);for(let l=0;l`cubic-bezier(${t}, ${e}, ${n}, ${s})`,bf={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ro([0,.65,.55,1]),circOut:Ro([.55,0,1,.45]),backIn:Ro([.31,.01,.66,-.59]),backOut:Ro([.33,1.53,.69,.99])};function yS(t,e){if(t)return typeof t=="function"&&Jl()?mS(t,e):Ah(t)?Ro(t):Array.isArray(t)?t.map(n=>yS(n,e)||bf.easeOut):bf[t]}const wn={x:!1,y:!1};function vS(){return wn.x||wn.y}function ON(t,e,n){var s;if(t instanceof Element)return[t];if(typeof t=="string"){let o=document;const l=(s=void 0)!==null&&s!==void 0?s:o.querySelectorAll(t);return l?Array.from(l):[]}return Array.from(t)}function wS(t,e){const n=ON(t),s=new AbortController,o={passive:!0,...e,signal:s.signal};return[n,o,()=>s.abort()]}function vv(t){return e=>{e.pointerType==="touch"||vS()||t(e)}}function NN(t,e,n={}){const[s,o,l]=wS(t,n),u=vv(d=>{const{target:f}=d,p=e(d);if(typeof p!="function"||!f)return;const g=vv(y=>{p(y),f.removeEventListener("pointerleave",g)});f.addEventListener("pointerleave",g,o)});return s.forEach(d=>{d.addEventListener("pointerenter",u,o)}),l}const xS=(t,e)=>e?t===e?!0:xS(t,e.parentElement):!1,Oh=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,DN=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function LN(t){return DN.has(t.tagName)||t.tabIndex!==-1}const Po=new WeakSet;function wv(t){return e=>{e.key==="Enter"&&t(e)}}function Rd(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const MN=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=wv(()=>{if(Po.has(n))return;Rd(n,"down");const o=wv(()=>{Rd(n,"up")}),l=()=>Rd(n,"cancel");n.addEventListener("keyup",o,e),n.addEventListener("blur",l,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function xv(t){return Oh(t)&&!vS()}function IN(t,e,n={}){const[s,o,l]=wS(t,n),u=d=>{const f=d.currentTarget;if(!xv(d)||Po.has(f))return;Po.add(f);const p=e(d),g=(E,R)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",w),!(!xv(E)||!Po.has(f))&&(Po.delete(f),typeof p=="function"&&p(E,{success:R}))},y=E=>{g(E,n.useGlobalTarget||xS(f,E.target))},w=E=>{g(E,!1)};window.addEventListener("pointerup",y,o),window.addEventListener("pointercancel",w,o)};return s.forEach(d=>{!LN(d)&&d.getAttribute("tabindex")===null&&(d.tabIndex=0),(n.useGlobalTarget?window:d).addEventListener("pointerdown",u,o),d.addEventListener("focus",p=>MN(p,o),o)}),l}function jN(t){return t==="x"||t==="y"?wn[t]?null:(wn[t]=!0,()=>{wn[t]=!1}):wn.x||wn.y?null:(wn.x=wn.y=!0,()=>{wn.x=wn.y=!1})}const SS=new Set(["width","height","top","left","right","bottom",...Pi]);let Ul;function FN(){Ul=void 0}const Ln={now:()=>(Ul===void 0&&Ln.set(mt.isProcessing||DO.useManualTiming?mt.timestamp:performance.now()),Ul),set:t=>{Ul=t,queueMicrotask(FN)}};function Nh(t,e){t.indexOf(e)===-1&&t.push(e)}function Dh(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Lh{constructor(){this.subscriptions=[]}add(e){return Nh(this.subscriptions,e),()=>Dh(this.subscriptions,e)}notify(e,n,s){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](e,n,s);else for(let l=0;l!isNaN(parseFloat(t));class UN{constructor(e,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,o=!0)=>{const l=Ln.now();this.updatedAt!==l&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Ln.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=BN(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Lh);const s=this.events[e].add(n);return e==="change"?()=>{s(),ze.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Ln.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Sv)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Sv);return bS(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function $o(t,e){return new UN(t,e)}function VN(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,$o(n))}function zN(t,e){const n=mu(t,e);let{transitionEnd:s={},transition:o={},...l}=n||{};l={...l,...s};for(const u in l){const d=eN(l[u]);VN(t,u,d)}}function $N(t){return!!(_t(t)&&t.add)}function Ef(t,e){const n=t.getValue("willChange");if($N(n))return n.add(e)}function ES(t){return t.props[Zx]}const TS=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,WN=1e-7,HN=12;function qN(t,e,n,s,o){let l,u,d=0;do u=e+(n-e)/2,l=TS(u,s,o)-t,l>0?n=u:e=u;while(Math.abs(l)>WN&&++dqN(l,0,1,t,n);return l=>l===0||l===1?l:TS(o(l),e,s)}const _S=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,CS=t=>e=>1-t(1-e),kS=ia(.33,1.53,.69,.99),Mh=CS(kS),RS=_S(Mh),PS=t=>(t*=2)<1?.5*Mh(t):.5*(2-Math.pow(2,-10*(t-1))),Ih=t=>1-Math.sin(Math.acos(t)),AS=CS(Ih),OS=_S(Ih),NS=t=>/^0[^.\s]+$/u.test(t);function KN(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||NS(t):!0}const Do=t=>Math.round(t*1e5)/1e5,jh=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function QN(t){return t==null}const GN=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Fh=(t,e)=>n=>!!(typeof n=="string"&&GN.test(n)&&n.startsWith(t)||e&&!QN(n)&&Object.prototype.hasOwnProperty.call(n,e)),DS=(t,e,n)=>s=>{if(typeof s!="string")return s;const[o,l,u,d]=s.match(jh);return{[t]:parseFloat(o),[e]:parseFloat(l),[n]:parseFloat(u),alpha:d!==void 0?parseFloat(d):1}},XN=t=>er(0,255,t),Pd={...Ai,transform:t=>Math.round(XN(t))},ds={test:Fh("rgb","red"),parse:DS("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Pd.transform(t)+", "+Pd.transform(e)+", "+Pd.transform(n)+", "+Do(zo.transform(s))+")"};function YN(t){let e="",n="",s="",o="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),o=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),o=t.substring(4,5),e+=e,n+=n,s+=s,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:o?parseInt(o,16)/255:1}}const Tf={test:Fh("#"),parse:YN,transform:ds.transform},si={test:Fh("hsl","hue"),parse:DS("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Dn.transform(Do(e))+", "+Dn.transform(Do(n))+", "+Do(zo.transform(s))+")"},Tt={test:t=>ds.test(t)||Tf.test(t)||si.test(t),parse:t=>ds.test(t)?ds.parse(t):si.test(t)?si.parse(t):Tf.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ds.transform(t):si.transform(t)},JN=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ZN(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(jh))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(JN))===null||n===void 0?void 0:n.length)||0)>0}const LS="number",MS="color",eD="var",tD="var(",bv="${}",nD=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Wo(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},o=[];let l=0;const d=e.replace(nD,f=>(Tt.test(f)?(s.color.push(l),o.push(MS),n.push(Tt.parse(f))):f.startsWith(tD)?(s.var.push(l),o.push(eD),n.push(f)):(s.number.push(l),o.push(LS),n.push(parseFloat(f))),++l,bv)).split(bv);return{values:n,split:d,indexes:s,types:o}}function IS(t){return Wo(t).values}function jS(t){const{split:e,types:n}=Wo(t),s=e.length;return o=>{let l="";for(let u=0;utypeof t=="number"?0:t;function sD(t){const e=IS(t);return jS(t)(e.map(rD))}const Br={test:ZN,parse:IS,createTransformer:jS,getAnimatableNone:sD},iD=new Set(["brightness","contrast","saturate","opacity"]);function oD(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(jh)||[];if(!s)return t;const o=n.replace(s,"");let l=iD.has(e)?1:0;return s!==n&&(l*=100),e+"("+l+o+")"}const aD=/\b([a-z-]*)\(.*?\)/gu,_f={...Br,getAnimatableNone:t=>{const e=t.match(aD);return e?e.map(oD).join(" "):t}},lD={...bh,color:Tt,backgroundColor:Tt,outlineColor:Tt,fill:Tt,stroke:Tt,borderColor:Tt,borderTopColor:Tt,borderRightColor:Tt,borderBottomColor:Tt,borderLeftColor:Tt,filter:_f,WebkitFilter:_f},Bh=t=>lD[t];function FS(t,e){let n=Bh(t);return n!==_f&&(n=Br),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const uD=new Set(["auto","none","0"]);function cD(t,e,n){let s=0,o;for(;st===Ai||t===ye,Tv=(t,e)=>parseFloat(t.split(", ")[e]),_v=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const o=s.match(/^matrix3d\((.+)\)$/u);if(o)return Tv(o[1],e);{const l=s.match(/^matrix\((.+)\)$/u);return l?Tv(l[1],t):0}},dD=new Set(["x","y","z"]),fD=Pi.filter(t=>!dD.has(t));function hD(t){const e=[];return fD.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const _i={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:_v(4,13),y:_v(5,14)};_i.translateX=_i.x;_i.translateY=_i.y;const Es=new Set;let Cf=!1,kf=!1;function BS(){if(kf){const t=Array.from(Es).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const o=hD(s);o.length&&(n.set(s,o),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const o=n.get(s);o&&o.forEach(([l,u])=>{var d;(d=s.getValue(l))===null||d===void 0||d.set(u)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}kf=!1,Cf=!1,Es.forEach(t=>t.complete()),Es.clear()}function US(){Es.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(kf=!0)})}function pD(){US(),BS()}class Uh{constructor(e,n,s,o,l,u=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=o,this.element=l,this.isAsync=u}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Es.add(this),Cf||(Cf=!0,ze.read(US),ze.resolveKeyframes(BS))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:o}=this;for(let l=0;l/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),mD=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function gD(t){const e=mD.exec(t);if(!e)return[,];const[,n,s,o]=e;return[`--${n??s}`,o]}function zS(t,e,n=1){const[s,o]=gD(t);if(!s)return;const l=window.getComputedStyle(e).getPropertyValue(s);if(l){const u=l.trim();return VS(u)?parseFloat(u):u}return Sh(o)?zS(o,e,n+1):o}const $S=t=>e=>e.test(t),yD={test:t=>t==="auto",parse:t=>t},WS=[Ai,ye,Dn,Cr,oN,iN,yD],Cv=t=>WS.find($S(t));class HS extends Uh{constructor(e,n,s,o,l){super(e,n,s,o,l,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let f=0;f{n.getValue(f).set(p)}),this.resolveNoneKeyframes()}}const kv=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Br.test(t)||t==="0")&&!t.startsWith("url("));function vD(t){const e=t[0];if(t.length===1)return!0;for(let n=0;nt!==null;function gu(t,{repeat:e,repeatType:n="loop"},s){const o=t.filter(xD),l=e&&n!=="loop"&&e%2===1?0:o.length-1;return!l||s===void 0?o[l]:s}const SD=40;class qS{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:o=0,repeatDelay:l=0,repeatType:u="loop",...d}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Ln.now(),this.options={autoplay:e,delay:n,type:s,repeat:o,repeatDelay:l,repeatType:u,...d},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>SD?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&pD(),this._resolved}onKeyframesResolved(e,n){this.resolvedAt=Ln.now(),this.hasAttemptedResolve=!0;const{name:s,type:o,velocity:l,delay:u,onComplete:d,onUpdate:f,isGenerator:p}=this.options;if(!p&&!wD(e,s,o,l))if(u)this.options.duration=0;else{f&&f(gu(e,this.options,n)),d&&d(),this.resolveFinishedPromise();return}const g=this.initPlayback(e,n);g!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...g},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const qe=(t,e,n)=>t+(e-t)*n;function Ad(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function bD({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let o=0,l=0,u=0;if(!e)o=l=u=n;else{const d=n<.5?n*(1+e):n+e-n*e,f=2*n-d;o=Ad(f,d,t+1/3),l=Ad(f,d,t),u=Ad(f,d,t-1/3)}return{red:Math.round(o*255),green:Math.round(l*255),blue:Math.round(u*255),alpha:s}}function Zl(t,e){return n=>n>0?e:t}const Od=(t,e,n)=>{const s=t*t,o=n*(e*e-s)+s;return o<0?0:Math.sqrt(o)},ED=[Tf,ds,si],TD=t=>ED.find(e=>e.test(t));function Rv(t){const e=TD(t);if(!e)return!1;let n=e.parse(t);return e===si&&(n=bD(n)),n}const Pv=(t,e)=>{const n=Rv(t),s=Rv(e);if(!n||!s)return Zl(t,e);const o={...n};return l=>(o.red=Od(n.red,s.red,l),o.green=Od(n.green,s.green,l),o.blue=Od(n.blue,s.blue,l),o.alpha=qe(n.alpha,s.alpha,l),ds.transform(o))},_D=(t,e)=>n=>e(t(n)),oa=(...t)=>t.reduce(_D),Rf=new Set(["none","hidden"]);function CD(t,e){return Rf.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function kD(t,e){return n=>qe(t,e,n)}function Vh(t){return typeof t=="number"?kD:typeof t=="string"?Sh(t)?Zl:Tt.test(t)?Pv:AD:Array.isArray(t)?KS:typeof t=="object"?Tt.test(t)?Pv:RD:Zl}function KS(t,e){const n=[...t],s=n.length,o=t.map((l,u)=>Vh(l)(l,e[u]));return l=>{for(let u=0;u{for(const l in s)n[l]=s[l](o);return n}}function PD(t,e){var n;const s=[],o={color:0,var:0,number:0};for(let l=0;l{const n=Br.createTransformer(e),s=Wo(t),o=Wo(e);return s.indexes.var.length===o.indexes.var.length&&s.indexes.color.length===o.indexes.color.length&&s.indexes.number.length>=o.indexes.number.length?Rf.has(t)&&!o.values.length||Rf.has(e)&&!s.values.length?CD(t,e):oa(KS(PD(s,o),o.values),n):Zl(t,e)};function QS(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?qe(t,e,n):Vh(t)(t,e)}const OD=5;function GS(t,e,n){const s=Math.max(e-OD,0);return bS(n-t(s),e-s)}const Ge={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Nd=.001;function ND({duration:t=Ge.duration,bounce:e=Ge.bounce,velocity:n=Ge.velocity,mass:s=Ge.mass}){let o,l,u=1-e;u=er(Ge.minDamping,Ge.maxDamping,u),t=er(Ge.minDuration,Ge.maxDuration,Zn(t)),u<1?(o=p=>{const g=p*u,y=g*t,w=g-n,E=Pf(p,u),R=Math.exp(-y);return Nd-w/E*R},l=p=>{const y=p*u*t,w=y*n+n,E=Math.pow(u,2)*Math.pow(p,2)*t,R=Math.exp(-y),b=Pf(Math.pow(p,2),u);return(-o(p)+Nd>0?-1:1)*((w-E)*R)/b}):(o=p=>{const g=Math.exp(-p*t),y=(p-n)*t+1;return-Nd+g*y},l=p=>{const g=Math.exp(-p*t),y=(n-p)*(t*t);return g*y});const d=5/t,f=LD(o,l,d);if(t=Jn(t),isNaN(f))return{stiffness:Ge.stiffness,damping:Ge.damping,duration:t};{const p=Math.pow(f,2)*s;return{stiffness:p,damping:u*2*Math.sqrt(s*p),duration:t}}}const DD=12;function LD(t,e,n){let s=n;for(let o=1;ot[n]!==void 0)}function jD(t){let e={velocity:Ge.velocity,stiffness:Ge.stiffness,damping:Ge.damping,mass:Ge.mass,isResolvedFromDuration:!1,...t};if(!Av(t,ID)&&Av(t,MD))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),o=s*s,l=2*er(.05,1,1-(t.bounce||0))*Math.sqrt(o);e={...e,mass:Ge.mass,stiffness:o,damping:l}}else{const n=ND(t);e={...e,...n,mass:Ge.mass},e.isResolvedFromDuration=!0}return e}function XS(t=Ge.visualDuration,e=Ge.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:o}=n;const l=n.keyframes[0],u=n.keyframes[n.keyframes.length-1],d={done:!1,value:l},{stiffness:f,damping:p,mass:g,duration:y,velocity:w,isResolvedFromDuration:E}=jD({...n,velocity:-Zn(n.velocity||0)}),R=w||0,b=p/(2*Math.sqrt(f*g)),x=u-l,S=Zn(Math.sqrt(f/g)),P=Math.abs(x)<5;s||(s=P?Ge.restSpeed.granular:Ge.restSpeed.default),o||(o=P?Ge.restDelta.granular:Ge.restDelta.default);let k;if(b<1){const F=Pf(S,b);k=V=>{const q=Math.exp(-b*S*V);return u-q*((R+b*S*x)/F*Math.sin(F*V)+x*Math.cos(F*V))}}else if(b===1)k=F=>u-Math.exp(-S*F)*(x+(R+S*x)*F);else{const F=S*Math.sqrt(b*b-1);k=V=>{const q=Math.exp(-b*S*V),B=Math.min(F*V,300);return u-q*((R+b*S*x)*Math.sinh(B)+F*x*Math.cosh(B))/F}}const A={calculatedDuration:E&&y||null,next:F=>{const V=k(F);if(E)d.done=F>=y;else{let q=0;b<1&&(q=F===0?Jn(R):GS(k,F,V));const B=Math.abs(q)<=s,Y=Math.abs(u-V)<=o;d.done=B&&Y}return d.value=d.done?u:V,d},toString:()=>{const F=Math.min(pS(A),Sf),V=mS(q=>A.next(F*q).value,F,30);return F+"ms "+V}};return A}function Ov({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:o=10,bounceStiffness:l=500,modifyTarget:u,min:d,max:f,restDelta:p=.5,restSpeed:g}){const y=t[0],w={done:!1,value:y},E=B=>d!==void 0&&Bf,R=B=>d===void 0?f:f===void 0||Math.abs(d-B)-b*Math.exp(-B/s),k=B=>S+P(B),A=B=>{const Y=P(B),ne=k(B);w.done=Math.abs(Y)<=p,w.value=w.done?S:ne};let F,V;const q=B=>{E(w.value)&&(F=B,V=XS({keyframes:[w.value,R(w.value)],velocity:GS(k,B,w.value),damping:o,stiffness:l,restDelta:p,restSpeed:g}))};return q(0),{calculatedDuration:null,next:B=>{let Y=!1;return!V&&F===void 0&&(Y=!0,A(B),q(B)),F!==void 0&&B>=F?V.next(B-F):(!Y&&A(B),w)}}}const FD=ia(.42,0,1,1),BD=ia(0,0,.58,1),YS=ia(.42,0,.58,1),UD=t=>Array.isArray(t)&&typeof t[0]!="number",VD={linear:qt,easeIn:FD,easeInOut:YS,easeOut:BD,circIn:Ih,circInOut:OS,circOut:AS,backIn:Mh,backInOut:RS,backOut:kS,anticipate:PS},Nv=t=>{if(Ah(t)){Qx(t.length===4);const[e,n,s,o]=t;return ia(e,n,s,o)}else if(typeof t=="string")return VD[t];return t};function zD(t,e,n){const s=[],o=n||QS,l=t.length-1;for(let u=0;ue[0];if(l===2&&e[0]===e[1])return()=>e[1];const u=t[0]===t[1];t[0]>t[l-1]&&(t=[...t].reverse(),e=[...e].reverse());const d=zD(e,s,o),f=d.length,p=g=>{if(u&&g1)for(;yp(er(t[0],t[l-1],g)):p}function WD(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const o=Ei(0,e,s);t.push(qe(n,1,o))}}function HD(t){const e=[0];return WD(e,t.length-1),e}function qD(t,e){return t.map(n=>n*e)}function KD(t,e){return t.map(()=>e||YS).splice(0,t.length-1)}function eu({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const o=UD(s)?s.map(Nv):Nv(s),l={done:!1,value:e[0]},u=qD(n&&n.length===e.length?n:HD(e),t),d=$D(u,e,{ease:Array.isArray(o)?o:KD(e,o)});return{calculatedDuration:t,next:f=>(l.value=d(f),l.done=f>=t,l)}}const QD=t=>{const e=({timestamp:n})=>t(n);return{start:()=>ze.update(e,!0),stop:()=>Fr(e),now:()=>mt.isProcessing?mt.timestamp:Ln.now()}},GD={decay:Ov,inertia:Ov,tween:eu,keyframes:eu,spring:XS},XD=t=>t/100;class zh extends qS{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:f}=this.options;f&&f()};const{name:n,motionValue:s,element:o,keyframes:l}=this.options,u=(o==null?void 0:o.KeyframeResolver)||Uh,d=(f,p)=>this.onKeyframesResolved(f,p);this.resolver=new u(l,d,n,s,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:n="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:l,velocity:u=0}=this.options,d=Ph(n)?n:GD[n]||eu;let f,p;d!==eu&&typeof e[0]!="number"&&(f=oa(XD,QS(e[0],e[1])),e=[0,100]);const g=d({...this.options,keyframes:e});l==="mirror"&&(p=d({...this.options,keyframes:[...e].reverse(),velocity:-u})),g.calculatedDuration===null&&(g.calculatedDuration=pS(g));const{calculatedDuration:y}=g,w=y+o,E=w*(s+1)-o;return{generator:g,mirroredGenerator:p,mapPercentToKeyframes:f,calculatedDuration:y,resolvedDuration:w,totalDuration:E}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:s}=this;if(!s){const{keyframes:B}=this.options;return{done:!0,value:B[B.length-1]}}const{finalKeyframe:o,generator:l,mirroredGenerator:u,mapPercentToKeyframes:d,keyframes:f,calculatedDuration:p,totalDuration:g,resolvedDuration:y}=s;if(this.startTime===null)return l.next(0);const{delay:w,repeat:E,repeatType:R,repeatDelay:b,onUpdate:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-g/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const S=this.currentTime-w*(this.speed>=0?1:-1),P=this.speed>=0?S<0:S>g;this.currentTime=Math.max(S,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=g);let k=this.currentTime,A=l;if(E){const B=Math.min(this.currentTime,g)/y;let Y=Math.floor(B),ne=B%1;!ne&&B>=1&&(ne=1),ne===1&&Y--,Y=Math.min(Y,E+1),!!(Y%2)&&(R==="reverse"?(ne=1-ne,b&&(ne-=b/y)):R==="mirror"&&(A=u)),k=er(0,1,ne)*y}const F=P?{done:!1,value:f[0]}:A.next(k);d&&(F.value=d(F.value));let{done:V}=F;!P&&p!==null&&(V=this.speed>=0?this.currentTime>=g:this.currentTime<=0);const q=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return q&&o!==void 0&&(F.value=gu(f,this.options,o)),x&&x(F.value),q&&this.finish(),F}get duration(){const{resolved:e}=this;return e?Zn(e.calculatedDuration):0}get time(){return Zn(this.currentTime)}set time(e){e=Jn(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=Zn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=QD,onPlay:n,startTime:s}=this.options;this.driver||(this.driver=e(l=>this.tick(l))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=s??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const YD=new Set(["opacity","clipPath","filter","transform"]);function JD(t,e,n,{delay:s=0,duration:o=300,repeat:l=0,repeatType:u="loop",ease:d="easeInOut",times:f}={}){const p={[e]:n};f&&(p.offset=f);const g=yS(d,o);return Array.isArray(g)&&(p.easing=g),t.animate(p,{delay:s,duration:o,easing:Array.isArray(g)?"linear":g,fill:"both",iterations:l+1,direction:u==="reverse"?"alternate":"normal"})}const ZD=ph(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),tu=10,e2=2e4;function t2(t){return Ph(t.type)||t.type==="spring"||!gS(t.ease)}function n2(t,e){const n=new zh({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const o=[];let l=0;for(;!s.done&&lthis.onKeyframesResolved(u,d),n,s,o),this.resolver.scheduleResolve()}initPlayback(e,n){let{duration:s=300,times:o,ease:l,type:u,motionValue:d,name:f,startTime:p}=this.options;if(!d.owner||!d.owner.current)return!1;if(typeof l=="string"&&Jl()&&r2(l)&&(l=JS[l]),t2(this.options)){const{onComplete:y,onUpdate:w,motionValue:E,element:R,...b}=this.options,x=n2(e,b);e=x.keyframes,e.length===1&&(e[1]=e[0]),s=x.duration,o=x.times,l=x.ease,u="keyframes"}const g=JD(d.owner.current,f,e,{...this.options,duration:s,times:o,ease:l});return g.startTime=p??this.calcStartTime(),this.pendingTimeline?(yv(g,this.pendingTimeline),this.pendingTimeline=void 0):g.onfinish=()=>{const{onComplete:y}=this.options;d.set(gu(e,this.options,n)),y&&y(),this.cancel(),this.resolveFinishedPromise()},{animation:g,duration:s,times:o,type:u,ease:l,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return Zn(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return Zn(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=Jn(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:n}=e;return n.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return qt;const{animation:s}=n;yv(s,e)}return qt}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:s,duration:o,type:l,ease:u,times:d}=e;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:p,onUpdate:g,onComplete:y,element:w,...E}=this.options,R=new zh({...E,keyframes:s,duration:o,type:l,ease:u,times:d,isGenerator:!0}),b=Jn(this.time);p.setWithVelocity(R.sample(b-tu).value,R.sample(b).value,tu)}const{onStop:f}=this.options;f&&f(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:s,repeatDelay:o,repeatType:l,damping:u,type:d}=e;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:f,transformTemplate:p}=n.owner.getProps();return ZD()&&s&&YD.has(s)&&!f&&!p&&!o&&l!=="mirror"&&u!==0&&d!=="inertia"}}const s2={type:"spring",stiffness:500,damping:25,restSpeed:10},i2=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),o2={type:"keyframes",duration:.8},a2={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},l2=(t,{keyframes:e})=>e.length>2?o2:As.has(t)?t.startsWith("scale")?i2(e[1]):s2:a2;function u2({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:o,repeat:l,repeatType:u,repeatDelay:d,from:f,elapsed:p,...g}){return!!Object.keys(g).length}const $h=(t,e,n,s={},o,l)=>u=>{const d=Rh(s,t)||{},f=d.delay||s.delay||0;let{elapsed:p=0}=s;p=p-Jn(f);let g={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...d,delay:-p,onUpdate:w=>{e.set(w),d.onUpdate&&d.onUpdate(w)},onComplete:()=>{u(),d.onComplete&&d.onComplete()},name:t,motionValue:e,element:l?void 0:o};u2(d)||(g={...g,...l2(t,g)}),g.duration&&(g.duration=Jn(g.duration)),g.repeatDelay&&(g.repeatDelay=Jn(g.repeatDelay)),g.from!==void 0&&(g.keyframes[0]=g.from);let y=!1;if((g.type===!1||g.duration===0&&!g.repeatDelay)&&(g.duration=0,g.delay===0&&(y=!0)),y&&!l&&e.get()!==void 0){const w=gu(g.keyframes,d);if(w!==void 0)return ze.update(()=>{g.onUpdate(w),g.onComplete()}),new RN([])}return!l&&Dv.supports(g)?new Dv(g):new zh(g)};function c2({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function ZS(t,e,{delay:n=0,transitionOverride:s,type:o}={}){var l;let{transition:u=t.getDefaultTransition(),transitionEnd:d,...f}=e;s&&(u=s);const p=[],g=o&&t.animationState&&t.animationState.getState()[o];for(const y in f){const w=t.getValue(y,(l=t.latestValues[y])!==null&&l!==void 0?l:null),E=f[y];if(E===void 0||g&&c2(g,y))continue;const R={delay:n,...Rh(u||{},y)};let b=!1;if(window.MotionHandoffAnimation){const S=ES(t);if(S){const P=window.MotionHandoffAnimation(S,y,ze);P!==null&&(R.startTime=P,b=!0)}}Ef(t,y),w.start($h(y,w,E,t.shouldReduceMotion&&SS.has(y)?{type:!1}:R,t,b));const x=w.animation;x&&p.push(x)}return d&&Promise.all(p).then(()=>{ze.update(()=>{d&&zN(t,d)})}),p}function Af(t,e,n={}){var s;const o=mu(t,e,n.type==="exit"?(s=t.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:l=t.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(l=n.transitionOverride);const u=o?()=>Promise.all(ZS(t,o,n)):()=>Promise.resolve(),d=t.variantChildren&&t.variantChildren.size?(p=0)=>{const{delayChildren:g=0,staggerChildren:y,staggerDirection:w}=l;return d2(t,e,g+p,y,w,n)}:()=>Promise.resolve(),{when:f}=l;if(f){const[p,g]=f==="beforeChildren"?[u,d]:[d,u];return p().then(()=>g())}else return Promise.all([u(),d(n.delay)])}function d2(t,e,n=0,s=0,o=1,l){const u=[],d=(t.variantChildren.size-1)*s,f=o===1?(p=0)=>p*s:(p=0)=>d-p*s;return Array.from(t.variantChildren).sort(f2).forEach((p,g)=>{p.notify("AnimationStart",e),u.push(Af(p,e,{...l,delay:n+f(g)}).then(()=>p.notify("AnimationComplete",e)))}),Promise.all(u)}function f2(t,e){return t.sortNodePosition(e)}function h2(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const o=e.map(l=>Af(t,l,n));s=Promise.all(o)}else if(typeof e=="string")s=Af(t,e,n);else{const o=typeof e=="function"?mu(t,e,n.custom):e;s=Promise.all(ZS(t,o,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const p2=gh.length;function e1(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?e1(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;nPromise.all(e.map(({animation:n,options:s})=>h2(t,n,s)))}function v2(t){let e=y2(t),n=Lv(),s=!0;const o=f=>(p,g)=>{var y;const w=mu(t,g,f==="exit"?(y=t.presenceContext)===null||y===void 0?void 0:y.custom:void 0);if(w){const{transition:E,transitionEnd:R,...b}=w;p={...p,...b,...R}}return p};function l(f){e=f(t)}function u(f){const{props:p}=t,g=e1(t.parent)||{},y=[],w=new Set;let E={},R=1/0;for(let x=0;xR&&A,Y=!1;const ne=Array.isArray(k)?k:[k];let ve=ne.reduce(o(S),{});F===!1&&(ve={});const{prevResolvedValues:Ce={}}=P,Se={...Ce,...ve},Z=ce=>{B=!0,w.has(ce)&&(Y=!0,w.delete(ce)),P.needsAnimating[ce]=!0;const Q=t.getValue(ce);Q&&(Q.liveStyle=!1)};for(const ce in Se){const Q=ve[ce],se=Ce[ce];if(E.hasOwnProperty(ce))continue;let z=!1;xf(Q)&&xf(se)?z=!hS(Q,se):z=Q!==se,z?Q!=null?Z(ce):w.add(ce):Q!==void 0&&w.has(ce)?Z(ce):P.protectedKeys[ce]=!0}P.prevProp=k,P.prevResolvedValues=ve,P.isActive&&(E={...E,...ve}),s&&t.blockInitialAnimation&&(B=!1),B&&(!(V&&q)||Y)&&y.push(...ne.map(ce=>({animation:ce,options:{type:S}})))}if(w.size){const x={};w.forEach(S=>{const P=t.getBaseTarget(S),k=t.getValue(S);k&&(k.liveStyle=!0),x[S]=P??null}),y.push({animation:x})}let b=!!y.length;return s&&(p.initial===!1||p.initial===p.animate)&&!t.manuallyAnimateOnMount&&(b=!1),s=!1,b?e(y):Promise.resolve()}function d(f,p){var g;if(n[f].isActive===p)return Promise.resolve();(g=t.variantChildren)===null||g===void 0||g.forEach(w=>{var E;return(E=w.animationState)===null||E===void 0?void 0:E.setActive(f,p)}),n[f].isActive=p;const y=u(f);for(const w in n)n[w].protectedKeys={};return y}return{animateChanges:u,setActive:d,setAnimateFunction:l,getState:()=>n,reset:()=>{n=Lv(),s=!0}}}function w2(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!hS(e,t):!1}function is(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Lv(){return{animate:is(!0),whileInView:is(),whileHover:is(),whileTap:is(),whileDrag:is(),whileFocus:is(),exit:is()}}class $r{constructor(e){this.isMounted=!1,this.node=e}update(){}}class x2 extends $r{constructor(e){super(e),e.animationState||(e.animationState=v2(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();hu(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let S2=0;class b2 extends $r{constructor(){super(...arguments),this.id=S2++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const o=this.node.animationState.setActive("exit",!e);n&&!e&&o.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const E2={animation:{Feature:x2},exit:{Feature:b2}};function Ho(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function aa(t){return{point:{x:t.pageX,y:t.pageY}}}const T2=t=>e=>Oh(e)&&t(e,aa(e));function Lo(t,e,n,s){return Ho(t,e,T2(n),s)}const Mv=(t,e)=>Math.abs(t-e);function _2(t,e){const n=Mv(t.x,e.x),s=Mv(t.y,e.y);return Math.sqrt(n**2+s**2)}class t1{constructor(e,n,{transformPagePoint:s,contextWindow:o,dragSnapToOrigin:l=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Ld(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,E=_2(y.offset,{x:0,y:0})>=3;if(!w&&!E)return;const{point:R}=y,{timestamp:b}=mt;this.history.push({...R,timestamp:b});const{onStart:x,onMove:S}=this.handlers;w||(x&&x(this.lastMoveEvent,y),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,y)},this.handlePointerMove=(y,w)=>{this.lastMoveEvent=y,this.lastMoveEventInfo=Dd(w,this.transformPagePoint),ze.update(this.updatePoint,!0)},this.handlePointerUp=(y,w)=>{this.end();const{onEnd:E,onSessionEnd:R,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Ld(y.type==="pointercancel"?this.lastMoveEventInfo:Dd(w,this.transformPagePoint),this.history);this.startEvent&&E&&E(y,x),R&&R(y,x)},!Oh(e))return;this.dragSnapToOrigin=l,this.handlers=n,this.transformPagePoint=s,this.contextWindow=o||window;const u=aa(e),d=Dd(u,this.transformPagePoint),{point:f}=d,{timestamp:p}=mt;this.history=[{...f,timestamp:p}];const{onSessionStart:g}=n;g&&g(e,Ld(d,this.history)),this.removeListeners=oa(Lo(this.contextWindow,"pointermove",this.handlePointerMove),Lo(this.contextWindow,"pointerup",this.handlePointerUp),Lo(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Fr(this.updatePoint)}}function Dd(t,e){return e?{point:e(t.point)}:t}function Iv(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ld({point:t},e){return{point:t,delta:Iv(t,n1(e)),offset:Iv(t,C2(e)),velocity:k2(e,.1)}}function C2(t){return t[0]}function n1(t){return t[t.length-1]}function k2(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const o=n1(t);for(;n>=0&&(s=t[n],!(o.timestamp-s.timestamp>Jn(e)));)n--;if(!s)return{x:0,y:0};const l=Zn(o.timestamp-s.timestamp);if(l===0)return{x:0,y:0};const u={x:(o.x-s.x)/l,y:(o.y-s.y)/l};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}const r1=1e-4,R2=1-r1,P2=1+r1,s1=.01,A2=0-s1,O2=0+s1;function Kt(t){return t.max-t.min}function N2(t,e,n){return Math.abs(t-e)<=n}function jv(t,e,n,s=.5){t.origin=s,t.originPoint=qe(e.min,e.max,t.origin),t.scale=Kt(n)/Kt(e),t.translate=qe(n.min,n.max,t.origin)-t.originPoint,(t.scale>=R2&&t.scale<=P2||isNaN(t.scale))&&(t.scale=1),(t.translate>=A2&&t.translate<=O2||isNaN(t.translate))&&(t.translate=0)}function Mo(t,e,n,s){jv(t.x,e.x,n.x,s?s.originX:void 0),jv(t.y,e.y,n.y,s?s.originY:void 0)}function Fv(t,e,n){t.min=n.min+e.min,t.max=t.min+Kt(e)}function D2(t,e,n){Fv(t.x,e.x,n.x),Fv(t.y,e.y,n.y)}function Bv(t,e,n){t.min=e.min-n.min,t.max=t.min+Kt(e)}function Io(t,e,n){Bv(t.x,e.x,n.x),Bv(t.y,e.y,n.y)}function L2(t,{min:e,max:n},s){return e!==void 0&&tn&&(t=s?qe(n,t,s.max):Math.min(t,n)),t}function Uv(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function M2(t,{top:e,left:n,bottom:s,right:o}){return{x:Uv(t.x,n,o),y:Uv(t.y,e,s)}}function Vv(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.mins?n=Ei(e.min,e.max-s,t.min):s>o&&(n=Ei(t.min,t.max-o,e.min)),er(0,1,n)}function F2(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Of=.35;function B2(t=Of){return t===!1?t=0:t===!0&&(t=Of),{x:zv(t,"left","right"),y:zv(t,"top","bottom")}}function zv(t,e,n){return{min:$v(t,e),max:$v(t,n)}}function $v(t,e){return typeof t=="number"?t:t[e]||0}const Wv=()=>({translate:0,scale:1,origin:0,originPoint:0}),ii=()=>({x:Wv(),y:Wv()}),Hv=()=>({min:0,max:0}),Je=()=>({x:Hv(),y:Hv()});function sn(t){return[t("x"),t("y")]}function i1({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function U2({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function V2(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Md(t){return t===void 0||t===1}function Nf({scale:t,scaleX:e,scaleY:n}){return!Md(t)||!Md(e)||!Md(n)}function as(t){return Nf(t)||o1(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function o1(t){return qv(t.x)||qv(t.y)}function qv(t){return t&&t!=="0%"}function nu(t,e,n){const s=t-n,o=e*s;return n+o}function Kv(t,e,n,s,o){return o!==void 0&&(t=nu(t,o,s)),nu(t,n,s)+e}function Df(t,e=0,n=1,s,o){t.min=Kv(t.min,e,n,s,o),t.max=Kv(t.max,e,n,s,o)}function a1(t,{x:e,y:n}){Df(t.x,e.translate,e.scale,e.originPoint),Df(t.y,n.translate,n.scale,n.originPoint)}const Qv=.999999999999,Gv=1.0000000000001;function z2(t,e,n,s=!1){const o=n.length;if(!o)return;e.x=e.y=1;let l,u;for(let d=0;dQv&&(e.x=1),e.yQv&&(e.y=1)}function oi(t,e){t.min=t.min+e,t.max=t.max+e}function Xv(t,e,n,s,o=.5){const l=qe(t.min,t.max,o);Df(t,e,n,l,s)}function ai(t,e){Xv(t.x,e.x,e.scaleX,e.scale,e.originX),Xv(t.y,e.y,e.scaleY,e.scale,e.originY)}function l1(t,e){return i1(V2(t.getBoundingClientRect(),e))}function $2(t,e,n){const s=l1(t,n),{scroll:o}=e;return o&&(oi(s.x,o.offset.x),oi(s.y,o.offset.y)),s}const u1=({current:t})=>t?t.ownerDocument.defaultView:null,W2=new WeakMap;class H2{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Je(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=g=>{const{dragSnapToOrigin:y}=this.getProps();y?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(aa(g).point)},l=(g,y)=>{const{drag:w,dragPropagation:E,onDragStart:R}=this.getProps();if(w&&!E&&(this.openDragLock&&this.openDragLock(),this.openDragLock=jN(w),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),sn(x=>{let S=this.getAxisMotionValue(x).get()||0;if(Dn.test(S)){const{projection:P}=this.visualElement;if(P&&P.layout){const k=P.layout.layoutBox[x];k&&(S=Kt(k)*(parseFloat(S)/100))}}this.originPoint[x]=S}),R&&ze.postRender(()=>R(g,y)),Ef(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},u=(g,y)=>{const{dragPropagation:w,dragDirectionLock:E,onDirectionLock:R,onDrag:b}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:x}=y;if(E&&this.currentDirection===null){this.currentDirection=q2(x),this.currentDirection!==null&&R&&R(this.currentDirection);return}this.updateAxis("x",y.point,x),this.updateAxis("y",y.point,x),this.visualElement.render(),b&&b(g,y)},d=(g,y)=>this.stop(g,y),f=()=>sn(g=>{var y;return this.getAnimationState(g)==="paused"&&((y=this.getAxisMotionValue(g).animation)===null||y===void 0?void 0:y.play())}),{dragSnapToOrigin:p}=this.getProps();this.panSession=new t1(e,{onSessionStart:o,onStart:l,onMove:u,onSessionEnd:d,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:p,contextWindow:u1(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:l}=this.getProps();l&&ze.postRender(()=>l(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:o}=this.getProps();if(!s||!Pl(e,o,this.currentDirection))return;const l=this.getAxisMotionValue(e);let u=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(u=L2(u,this.constraints[e],this.elastic[e])),l.set(u)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:s}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,l=this.constraints;n&&ri(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=M2(o.layoutBox,n):this.constraints=!1,this.elastic=B2(s),l!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&sn(u=>{this.constraints!==!1&&this.getAxisMotionValue(u)&&(this.constraints[u]=F2(o.layoutBox[u],this.constraints[u]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!ri(e))return!1;const s=e.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const l=$2(s,o.root,this.visualElement.getTransformPagePoint());let u=I2(o.layout.layoutBox,l);if(n){const d=n(U2(u));this.hasMutatedConstraints=!!d,d&&(u=i1(d))}return u}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:o,dragTransition:l,dragSnapToOrigin:u,onDragTransitionEnd:d}=this.getProps(),f=this.constraints||{},p=sn(g=>{if(!Pl(g,n,this.currentDirection))return;let y=f&&f[g]||{};u&&(y={min:0,max:0});const w=o?200:1e6,E=o?40:1e7,R={type:"inertia",velocity:s?e[g]:0,bounceStiffness:w,bounceDamping:E,timeConstant:750,restDelta:1,restSpeed:10,...l,...y};return this.startAxisValueAnimation(g,R)});return Promise.all(p).then(d)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return Ef(this.visualElement,e),s.start($h(e,s,0,n,this.visualElement,!1))}stopAnimation(){sn(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){sn(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),o=s[n];return o||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){sn(n=>{const{drag:s}=this.getProps();if(!Pl(n,s,this.currentDirection))return;const{projection:o}=this.visualElement,l=this.getAxisMotionValue(n);if(o&&o.layout){const{min:u,max:d}=o.layout.layoutBox[n];l.set(e[n]-qe(u,d,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!ri(n)||!s||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};sn(u=>{const d=this.getAxisMotionValue(u);if(d&&this.constraints!==!1){const f=d.get();o[u]=j2({min:f,max:f},this.constraints[u])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),sn(u=>{if(!Pl(u,e,null))return;const d=this.getAxisMotionValue(u),{min:f,max:p}=this.constraints[u];d.set(qe(f,p,o[u]))})}addListeners(){if(!this.visualElement.current)return;W2.set(this.visualElement,this);const e=this.visualElement.current,n=Lo(e,"pointerdown",f=>{const{drag:p,dragListener:g=!0}=this.getProps();p&&g&&this.start(f)}),s=()=>{const{dragConstraints:f}=this.getProps();ri(f)&&f.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,l=o.addEventListener("measure",s);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),ze.read(s);const u=Ho(window,"resize",()=>this.scalePositionWithinConstraints()),d=o.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:p})=>{this.isDragging&&p&&(sn(g=>{const y=this.getAxisMotionValue(g);y&&(this.originPoint[g]+=f[g].translate,y.set(y.get()+f[g].translate))}),this.visualElement.render())}));return()=>{u(),n(),l(),d&&d()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:o=!1,dragConstraints:l=!1,dragElastic:u=Of,dragMomentum:d=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:o,dragConstraints:l,dragElastic:u,dragMomentum:d}}}function Pl(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function q2(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class K2 extends $r{constructor(e){super(e),this.removeGroupControls=qt,this.removeListeners=qt,this.controls=new H2(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||qt}unmount(){this.removeGroupControls(),this.removeListeners()}}const Yv=t=>(e,n)=>{t&&ze.postRender(()=>t(e,n))};class Q2 extends $r{constructor(){super(...arguments),this.removePointerDownListener=qt}onPointerDown(e){this.session=new t1(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:u1(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:o}=this.node.getProps();return{onSessionStart:Yv(e),onStart:Yv(n),onMove:s,onEnd:(l,u)=>{delete this.session,o&&ze.postRender(()=>o(l,u))}}}mount(){this.removePointerDownListener=Lo(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Vl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Jv(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const So={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(ye.test(t))t=parseFloat(t);else return t;const n=Jv(t,e.target.x),s=Jv(t,e.target.y);return`${n}% ${s}%`}},G2={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,o=Br.parse(t);if(o.length>5)return s;const l=Br.createTransformer(t),u=typeof o[0]!="number"?1:0,d=n.x.scale*e.x,f=n.y.scale*e.y;o[0+u]/=d,o[1+u]/=f;const p=qe(d,f,.5);return typeof o[2+u]=="number"&&(o[2+u]/=p),typeof o[3+u]=="number"&&(o[3+u]/=p),l(o)}};class X2 extends _.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:o}=this.props,{projection:l}=e;gN(Y2),l&&(n.group&&n.group.add(l),s&&s.register&&o&&s.register(l),l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,onExitComplete:()=>this.safeToRemove()})),Vl.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:o,isPresent:l}=this.props,u=s.projection;return u&&(u.isPresent=l,o||e.layoutDependency!==n||n===void 0?u.willUpdate():this.safeToRemove(),e.isPresent!==l&&(l?u.promote():u.relegate()||ze.postRender(()=>{const d=u.getStack();(!d||!d.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),vh.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:o}=e;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),s&&s.deregister&&s.deregister(o))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function c1(t){const[e,n]=OO(),s=_.useContext(qx);return T.jsx(X2,{...t,layoutGroup:s,switchLayoutGroup:_.useContext(eS),isPresent:e,safeToRemove:n})}const Y2={borderRadius:{...So,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:So,borderTopRightRadius:So,borderBottomLeftRadius:So,borderBottomRightRadius:So,boxShadow:G2};function J2(t,e,n){const s=_t(t)?t:$o(t);return s.start($h("",s,e,n)),s.animation}function Z2(t){return t instanceof SVGElement&&t.tagName!=="svg"}const eL=(t,e)=>t.depth-e.depth;class tL{constructor(){this.children=[],this.isDirty=!1}add(e){Nh(this.children,e),this.isDirty=!0}remove(e){Dh(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(eL),this.isDirty=!1,this.children.forEach(e)}}function nL(t,e){const n=Ln.now(),s=({timestamp:o})=>{const l=o-n;l>=e&&(Fr(s),t(l-e))};return ze.read(s,!0),()=>Fr(s)}const d1=["TopLeft","TopRight","BottomLeft","BottomRight"],rL=d1.length,Zv=t=>typeof t=="string"?parseFloat(t):t,e0=t=>typeof t=="number"||ye.test(t);function sL(t,e,n,s,o,l){o?(t.opacity=qe(0,n.opacity!==void 0?n.opacity:1,iL(s)),t.opacityExit=qe(e.opacity!==void 0?e.opacity:1,0,oL(s))):l&&(t.opacity=qe(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let u=0;use?1:n(Ei(t,e,s))}function n0(t,e){t.min=e.min,t.max=e.max}function rn(t,e){n0(t.x,e.x),n0(t.y,e.y)}function r0(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function s0(t,e,n,s,o){return t-=e,t=nu(t,1/n,s),o!==void 0&&(t=nu(t,1/o,s)),t}function aL(t,e=0,n=1,s=.5,o,l=t,u=t){if(Dn.test(e)&&(e=parseFloat(e),e=qe(u.min,u.max,e/100)-u.min),typeof e!="number")return;let d=qe(l.min,l.max,s);t===l&&(d-=e),t.min=s0(t.min,e,n,d,o),t.max=s0(t.max,e,n,d,o)}function i0(t,e,[n,s,o],l,u){aL(t,e[n],e[s],e[o],e.scale,l,u)}const lL=["x","scaleX","originX"],uL=["y","scaleY","originY"];function o0(t,e,n,s){i0(t.x,e,lL,n?n.x:void 0,s?s.x:void 0),i0(t.y,e,uL,n?n.y:void 0,s?s.y:void 0)}function a0(t){return t.translate===0&&t.scale===1}function h1(t){return a0(t.x)&&a0(t.y)}function l0(t,e){return t.min===e.min&&t.max===e.max}function cL(t,e){return l0(t.x,e.x)&&l0(t.y,e.y)}function u0(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function p1(t,e){return u0(t.x,e.x)&&u0(t.y,e.y)}function c0(t){return Kt(t.x)/Kt(t.y)}function d0(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class dL{constructor(){this.members=[]}add(e){Nh(this.members,e),e.scheduleRender()}remove(e){if(Dh(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(o=>e===o);if(n===0)return!1;let s;for(let o=n;o>=0;o--){const l=this.members[o];if(l.isPresent!==!1){s=l;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:o}=e.options;o===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function fL(t,e,n){let s="";const o=t.x.translate/e.x,l=t.y.translate/e.y,u=(n==null?void 0:n.z)||0;if((o||l||u)&&(s=`translate3d(${o}px, ${l}px, ${u}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:p,rotate:g,rotateX:y,rotateY:w,skewX:E,skewY:R}=n;p&&(s=`perspective(${p}px) ${s}`),g&&(s+=`rotate(${g}deg) `),y&&(s+=`rotateX(${y}deg) `),w&&(s+=`rotateY(${w}deg) `),E&&(s+=`skewX(${E}deg) `),R&&(s+=`skewY(${R}deg) `)}const d=t.x.scale*e.x,f=t.y.scale*e.y;return(d!==1||f!==1)&&(s+=`scale(${d}, ${f})`),s||"none"}const ls={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Ao=typeof window<"u"&&window.MotionDebug!==void 0,Id=["","X","Y","Z"],hL={visibility:"hidden"},f0=1e3;let pL=0;function jd(t,e,n,s){const{latestValues:o}=e;o[t]&&(n[t]=o[t],e.setStaticValue(t,0),s&&(s[t]=0))}function m1(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=ES(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:l}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",ze,!(o||l))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&m1(s)}function g1({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(u={},d=e==null?void 0:e()){this.id=pL++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Ao&&(ls.totalNodes=ls.resolvedTargetDeltas=ls.recalculatedProjection=0),this.nodes.forEach(yL),this.nodes.forEach(bL),this.nodes.forEach(EL),this.nodes.forEach(vL),Ao&&window.MotionDebug.record(ls)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=u,this.root=d?d.root||d:this,this.path=d?[...d.path,d]:[],this.parent=d,this.depth=d?d.depth+1:0;for(let f=0;fthis.root.updateBlockedByResize=!1;t(u,()=>{this.root.updateBlockedByResize=!0,y&&y(),y=nL(w,250),Vl.hasAnimatedSinceResize&&(Vl.hasAnimatedSinceResize=!1,this.nodes.forEach(p0))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&g&&(f||p)&&this.addEventListener("didUpdate",({delta:y,hasLayoutChanged:w,hasRelativeTargetChanged:E,layout:R})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||g.getDefaultTransition()||RL,{onLayoutAnimationStart:x,onLayoutAnimationComplete:S}=g.getProps(),P=!this.targetLayout||!p1(this.targetLayout,R)||E,k=!w&&E;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||k||w&&(P||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(y,k);const A={...Rh(b,"layout"),onPlay:x,onComplete:S};(g.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A)}else w||p0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=R})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const u=this.getStack();u&&u.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Fr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(TL),this.animationId++)}getTransformTemplate(){const{visualElement:u}=this.options;return u&&u.getProps().transformTemplate}willUpdate(u=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&m1(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let g=0;g{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let f=0;f{const F=A/1e3;m0(y.x,u.x,F),m0(y.y,u.y,F),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Io(w,this.layout.layoutBox,this.relativeParent.layout.layoutBox),CL(this.relativeTarget,this.relativeTargetOrigin,w,F),k&&cL(this.relativeTarget,k)&&(this.isProjectionDirty=!1),k||(k=Je()),rn(k,this.relativeTarget)),b&&(this.animationValues=g,sL(g,p,this.latestValues,F,P,S)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=F},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(u){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Fr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ze.update(()=>{Vl.hasAnimatedSinceResize=!0,this.currentAnimation=J2(0,f0,{...u,onUpdate:d=>{this.mixTargetDelta(d),u.onUpdate&&u.onUpdate(d)},onComplete:()=>{u.onComplete&&u.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const u=this.getStack();u&&u.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(f0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const u=this.getLead();let{targetWithTransforms:d,target:f,layout:p,latestValues:g}=u;if(!(!d||!f||!p)){if(this!==u&&this.layout&&p&&y1(this.options.animationType,this.layout.layoutBox,p.layoutBox)){f=this.target||Je();const y=Kt(this.layout.layoutBox.x);f.x.min=u.target.x.min,f.x.max=f.x.min+y;const w=Kt(this.layout.layoutBox.y);f.y.min=u.target.y.min,f.y.max=f.y.min+w}rn(d,f),ai(d,g),Mo(this.projectionDeltaWithTransform,this.layoutCorrected,d,g)}}registerSharedNode(u,d){this.sharedNodes.has(u)||this.sharedNodes.set(u,new dL),this.sharedNodes.get(u).add(d);const p=d.options.initialPromotionConfig;d.promote({transition:p?p.transition:void 0,preserveFollowOpacity:p&&p.shouldPreserveFollowOpacity?p.shouldPreserveFollowOpacity(d):void 0})}isLead(){const u=this.getStack();return u?u.lead===this:!0}getLead(){var u;const{layoutId:d}=this.options;return d?((u=this.getStack())===null||u===void 0?void 0:u.lead)||this:this}getPrevLead(){var u;const{layoutId:d}=this.options;return d?(u=this.getStack())===null||u===void 0?void 0:u.prevLead:void 0}getStack(){const{layoutId:u}=this.options;if(u)return this.root.sharedNodes.get(u)}promote({needsReset:u,transition:d,preserveFollowOpacity:f}={}){const p=this.getStack();p&&p.promote(this,f),u&&(this.projectionDelta=void 0,this.needsReset=!0),d&&this.setOptions({transition:d})}relegate(){const u=this.getStack();return u?u.relegate(this):!1}resetSkewAndRotation(){const{visualElement:u}=this.options;if(!u)return;let d=!1;const{latestValues:f}=u;if((f.z||f.rotate||f.rotateX||f.rotateY||f.rotateZ||f.skewX||f.skewY)&&(d=!0),!d)return;const p={};f.z&&jd("z",u,p,this.animationValues);for(let g=0;g{var d;return(d=u.currentAnimation)===null||d===void 0?void 0:d.stop()}),this.root.nodes.forEach(h0),this.root.sharedNodes.clear()}}}function mL(t){t.updateLayout()}function gL(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:o}=t.layout,{animationType:l}=t.options,u=n.source!==t.layout.source;l==="size"?sn(y=>{const w=u?n.measuredBox[y]:n.layoutBox[y],E=Kt(w);w.min=s[y].min,w.max=w.min+E}):y1(l,n.layoutBox,s)&&sn(y=>{const w=u?n.measuredBox[y]:n.layoutBox[y],E=Kt(s[y]);w.max=w.min+E,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[y].max=t.relativeTarget[y].min+E)});const d=ii();Mo(d,s,n.layoutBox);const f=ii();u?Mo(f,t.applyTransform(o,!0),n.measuredBox):Mo(f,s,n.layoutBox);const p=!h1(d);let g=!1;if(!t.resumeFrom){const y=t.getClosestProjectingParent();if(y&&!y.resumeFrom){const{snapshot:w,layout:E}=y;if(w&&E){const R=Je();Io(R,n.layoutBox,w.layoutBox);const b=Je();Io(b,s,E.layoutBox),p1(R,b)||(g=!0),y.options.layoutRoot&&(t.relativeTarget=b,t.relativeTargetOrigin=R,t.relativeParent=y)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:f,layoutDelta:d,hasLayoutChanged:p,hasRelativeTargetChanged:g})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function yL(t){Ao&&ls.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function vL(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function wL(t){t.clearSnapshot()}function h0(t){t.clearMeasurements()}function xL(t){t.isLayoutDirty=!1}function SL(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function p0(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function bL(t){t.resolveTargetDelta()}function EL(t){t.calcProjection()}function TL(t){t.resetSkewAndRotation()}function _L(t){t.removeLeadSnapshot()}function m0(t,e,n){t.translate=qe(e.translate,0,n),t.scale=qe(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function g0(t,e,n,s){t.min=qe(e.min,n.min,s),t.max=qe(e.max,n.max,s)}function CL(t,e,n,s){g0(t.x,e.x,n.x,s),g0(t.y,e.y,n.y,s)}function kL(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const RL={duration:.45,ease:[.4,0,.1,1]},y0=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),v0=y0("applewebkit/")&&!y0("chrome/")?Math.round:qt;function w0(t){t.min=v0(t.min),t.max=v0(t.max)}function PL(t){w0(t.x),w0(t.y)}function y1(t,e,n){return t==="position"||t==="preserve-aspect"&&!N2(c0(e),c0(n),.2)}function AL(t){var e;return t!==t.root&&((e=t.scroll)===null||e===void 0?void 0:e.wasRoot)}const OL=g1({attachResizeListener:(t,e)=>Ho(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Fd={current:void 0},v1=g1({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Fd.current){const t=new OL({});t.mount(window),t.setOptions({layoutScroll:!0}),Fd.current=t}return Fd.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),NL={pan:{Feature:Q2},drag:{Feature:K2,ProjectionNode:v1,MeasureLayout:c1}};function x0(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,l=s[o];l&&ze.postRender(()=>l(e,aa(e)))}class DL extends $r{mount(){const{current:e}=this.node;e&&(this.unmount=NN(e,n=>(x0(this.node,n,"Start"),s=>x0(this.node,s,"End"))))}unmount(){}}class LL extends $r{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=oa(Ho(this.node.current,"focus",()=>this.onFocus()),Ho(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function S0(t,e,n){const{props:s}=t;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),l=s[o];l&&ze.postRender(()=>l(e,aa(e)))}class ML extends $r{mount(){const{current:e}=this.node;e&&(this.unmount=IN(e,n=>(S0(this.node,n,"Start"),(s,{success:o})=>S0(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Lf=new WeakMap,Bd=new WeakMap,IL=t=>{const e=Lf.get(t.target);e&&e(t)},jL=t=>{t.forEach(IL)};function FL({root:t,...e}){const n=t||document;Bd.has(n)||Bd.set(n,{});const s=Bd.get(n),o=JSON.stringify(e);return s[o]||(s[o]=new IntersectionObserver(jL,{root:t,...e})),s[o]}function BL(t,e,n){const s=FL(e);return Lf.set(t,n),s.observe(t),()=>{Lf.delete(t),s.unobserve(t)}}const UL={some:0,all:1};class VL extends $r{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:o="some",once:l}=e,u={root:n?n.current:void 0,rootMargin:s,threshold:typeof o=="number"?o:UL[o]},d=f=>{const{isIntersecting:p}=f;if(this.isInView===p||(this.isInView=p,l&&!p&&this.hasEnteredView))return;p&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",p);const{onViewportEnter:g,onViewportLeave:y}=this.node.getProps(),w=p?g:y;w&&w(f)};return BL(this.node.current,u,d)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(zL(e,n))&&this.startObserver()}unmount(){}}function zL({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const $L={inView:{Feature:VL},tap:{Feature:ML},focus:{Feature:LL},hover:{Feature:DL}},WL={layout:{ProjectionNode:v1,MeasureLayout:c1}},ru={current:null},Wh={current:!1};function w1(){if(Wh.current=!0,!!hh)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ru.current=t.matches;t.addListener(e),e()}else ru.current=!1}const HL=[...WS,Tt,Br],qL=t=>HL.find($S(t)),b0=new WeakMap;function KL(t,e,n){for(const s in e){const o=e[s],l=n[s];if(_t(o))t.addValue(s,o);else if(_t(l))t.addValue(s,$o(o,{owner:t}));else if(l!==o)if(t.hasValue(s)){const u=t.getValue(s);u.liveStyle===!0?u.jump(o):u.hasAnimated||u.set(o)}else{const u=t.getStaticValue(s);t.addValue(s,$o(u!==void 0?u:o,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const E0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class QL{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:o,blockInitialAnimation:l,visualState:u},d={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Uh,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const E=Ln.now();this.renderScheduledAtthis.bindToMotionValue(s,n)),Wh.current||w1(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ru.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){b0.delete(this.current),this.projection&&this.projection.unmount(),Fr(this.notifyUpdate),Fr(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=As.has(e),o=n.on("change",d=>{this.latestValues[e]=d,this.props.onUpdate&&ze.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),l=n.on("renderRequest",this.scheduleRender);let u;window.MotionCheckAppearSync&&(u=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{o(),l(),u&&u(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Ti){const n=Ti[e];if(!n)continue;const{isEnabled:s,Feature:o}=n;if(!this.features[e]&&o&&s(this.props)&&(this.features[e]=new o(this)),this.features[e]){const l=this.features[e];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Je()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;sn.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=$o(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){var s;let o=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(s=this.getBaseTargetFromProps(this.props,e))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,e,this.options);return o!=null&&(typeof o=="string"&&(VS(o)||NS(o))?o=parseFloat(o):!qL(o)&&Br.test(n)&&(o=FS(e,n)),this.setBaseTarget(e,_t(o)?o.get():o)),_t(o)?o.get():o}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props;let o;if(typeof s=="string"||typeof s=="object"){const u=xh(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);u&&(o=u[e])}if(s&&o!==void 0)return o;const l=this.getBaseTargetFromProps(this.props,e);return l!==void 0&&!_t(l)?l:this.initialValues[e]!==void 0&&o===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Lh),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class x1 extends QL{constructor(){super(...arguments),this.KeyframeResolver=HS}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;_t(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function GL(t){return window.getComputedStyle(t)}class XL extends x1{constructor(){super(...arguments),this.type="html",this.renderInstance=aS}readValueFromInstance(e,n){if(As.has(n)){const s=Bh(n);return s&&s.default||0}else{const s=GL(e),o=(sS(n)?s.getPropertyValue(n):s[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return l1(e,n)}build(e,n,s){Eh(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return kh(e,n,s)}}class YL extends x1{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Je}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(As.has(n)){const s=Bh(n);return s&&s.default||0}return n=lS.has(n)?n:yh(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return dS(e,n,s)}build(e,n,s){Th(e,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,n,s,o){uS(e,n,s,o)}mount(e){this.isSVGTag=Ch(e.tagName),super.mount(e)}}const JL=(t,e)=>wh(t)?new YL(e):new XL(e,{allowProjection:t!==_.Fragment}),ZL=_N({...E2,...$L,...NL,...WL},JL),Mf=UO(ZL);function S1(){!Wh.current&&w1();const[t]=_.useState(ru.current);return t}function eM(t){const[e,n]=_.useState(null);return _.useLayoutEffect(()=>{const s=t.current;if(!s)return;const o=s.getBoundingClientRect();n({width:o.width,height:o.height});const l=new ResizeObserver(([u])=>{const{width:d,height:f}=u.contentRect;n({width:d,height:f})});return l.observe(s),()=>l.disconnect()},[t]),e}const tM={"media.base44.com":"/images/public/","static.wixstatic.com":"/media/"},nM=1024,Qn={OPTIMIZED:"optimized",ORIGINAL:"original",FALLBACK:"fallback"},rM=[1,2,3],sM=6e3;function iM(t){try{const e=new URL(t);if(e.protocol!=="https:"||e.username||e.password||e.port&&e.port!=="443")return null;const n=tM[e.hostname];if(!n)return null;const s=e.pathname.match(/^(.*)\/v1\/(?:fill|fit)\/[^/]+\/[^/]+$/i),o=s?s[1]:e.pathname,l=o.split("/").pop();return!o.startsWith(n)||!l||!/\.[a-z0-9]+$/i.test(l)||/\.svg$/i.test(l)?null:{baseUrl:`${e.origin}${o}`,filename:l}}catch{return null}}const T0=t=>Math.min(Math.max(Math.round(t),1),sM),_0=t=>Math.min(1,Math.max(0,t));function If({baseUrl:t,filename:e},{width:n,height:s,crop:o,focalPoint:l,quality:u}){const d=[`w_${T0(n)}`,`h_${T0(s||n)}`];o&&d.push(l?`fp_${_0(l.x).toFixed(2)}_${_0(l.y).toFixed(2)}`:"al_c"),d.push(`q_${u}`,"usm_0.66_1.00_0.01","enc_webp","quality_auto");const f=/\.gif$/i.test(e)?e:e.replace(/\.[a-z0-9]+$/i,"")+".webp";return`${t}/v1/${o?"fill":"fit"}/${d.join(",")}/${f}`}function oM(t,e){return rM.map(n=>`${If(t,{...e,width:e.width*n,height:e.height?e.height*n:void 0})} ${n}x`).join(", ")}function aM(t,e){return(e==null?void 0:e.baseUrl)||t}function lM(t){return t===Qn.OPTIMIZED?Qn.ORIGINAL:Qn.FALLBACK}const Ud="https://static.wixstatic.com/media/12d367_4f26ccd17f8f4e3a8958306ea08c2332~mv2.png",b1=_.forwardRef(({aspectRatio:t,className:e,style:n,children:s},o)=>T.jsx("span",{ref:o,className:zr("inline-block relative",e),style:{aspectRatio:t,...n},children:s}));b1.displayName="ImageWrapper";const E1=_.forwardRef(({parsed:t,fittingType:e,focalPoint:n,quality:s,className:o,style:l,aspectRatio:u,onLoad:d,...f},p)=>{const g=_.useRef(null),y=_.useRef(null),w=eM(g),[E,R]=_.useState(!1);_.useImperativeHandle(p,()=>y.current),_.useEffect(()=>{R(!1)},[t.baseUrl]);const b=e!=="fit",x=w&&{width:w.width||nM,height:w.height?w.height:void 0,crop:b,focalPoint:b?n:void 0,quality:s};return T.jsxs(b1,{ref:g,aspectRatio:u,className:o,style:l,children:[x&&!E&&T.jsx("img",{src:If(t,{...x,width:20,height:x.height?Math.max(1,Math.round(20*x.height/x.width)):void 0,quality:20}),alt:"","aria-hidden":"true",className:"w-full h-full inset-0 absolute",style:{objectFit:e==="fit"?"contain":"cover",filter:"blur(10px)",transform:"scale(1.1)"}}),x&&T.jsx("img",{ref:y,src:If(t,x),srcSet:oM(t,x),loading:"lazy",className:zr("w-full h-full inset-0 absolute",e==="fit"?"object-contain":"object-cover"),onLoad:S=>{R(!0),d==null||d(S)},...f})]})});E1.displayName="ResponsiveImage";const T1=_.forwardRef(({src:t,fittingType:e="fill",originWidth:n,originHeight:s,focalPointX:o,focalPointY:l,quality:u=90,onError:d,...f},p)=>{const g=t&&t!==Ud?iM(t):null,y=g?Qn.OPTIMIZED:Qn.ORIGINAL,[w,E]=_.useState({src:t,mode:y}),R=w.src===t?w.mode:y;_.useEffect(()=>{E({src:t,mode:y})},[t,y]);const x={...f,onError:A=>{if(R===Qn.FALLBACK)return;const F=lM(R);E({src:t,mode:F}),F===Qn.FALLBACK&&(d==null||d(A))}};if(!t)return T.jsx("img",{ref:p,src:Ud,...x,"data-empty-image":!0});const S=R===Qn.OPTIMIZED?g:null;if(!S){const A=R===Qn.FALLBACK,F=A?Ud:aM(t,g);return T.jsx("img",{ref:p,src:F,...x,"data-error-image":A||void 0})}const P=typeof o=="number"&&typeof l=="number"?{x:o,y:l}:void 0,k=n&&s?`${n} / ${s}`:void 0;return T.jsx(E1,{ref:p,parsed:S,fittingType:e,focalPoint:P,quality:u,aspectRatio:k,...x})});T1.displayName="Image";const uM="https://media.base44.com/images/public/6a92af5fef1a1c70ffdacb6b/71db00bc5_generated_04495681.png";function cM(){const t=S1();return T.jsxs("section",{style:{position:"relative",height:"100vh",minHeight:700,width:"100%",overflow:"hidden",display:"flex",alignItems:"center"},children:[T.jsx("div",{style:{position:"absolute",inset:0,zIndex:0},children:T.jsx(T1,{src:uM,alt:"",fittingType:"fill",className:"w-full h-full"})}),T.jsx("div",{style:{position:"absolute",inset:0,zIndex:1,background:"linear-gradient(to bottom, rgba(26,26,26,0.55) 0%, rgba(26,26,26,0.75) 100%)"}}),T.jsx("div",{className:"alrazah-container",style:{position:"relative",zIndex:2,width:"100%"},children:T.jsxs("div",{style:{maxWidth:600},children:[T.jsx("div",{className:"alrazah-caption-label",style:{color:"rgba(255,255,255,0.6)",marginBottom:24},children:"Our Businesses"}),T.jsx("div",{style:{width:48,height:2,background:"#8D0034",marginBottom:32}}),T.jsx("h1",{className:"display-xl",style:{color:"#fff",maxWidth:600,marginBottom:24},children:"Debt Capital"}),T.jsx("p",{className:"body-lg",style:{color:"rgba(255,255,255,0.8)",maxWidth:560,marginBottom:40},children:"Strategic financing solutions that underpin long-term value creation and Qatar's economic diversification."})]})}),!t&&T.jsx(Mf.div,{"aria-hidden":"true",style:{position:"absolute",bottom:40,left:"50%",width:1,height:40,background:"rgba(255,255,255,0.4)",zIndex:2},animate:{opacity:[.4,.8,.4]},transition:{duration:2,repeat:1/0,ease:"easeInOut"}}),T.jsx("style",{children:"@media (max-width: 767px) { .scroll-indicator { display: none !important; } }"})]})}function At({children:t,delay:e=0,className:n="",as:s="div"}){const o=S1(),l=Mf[s]||Mf.div;return o?T.jsx(l,{className:n,children:t}):T.jsx(l,{className:n,initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,amount:.15},transition:{duration:.6,ease:[.25,.1,.25,1],delay:e},children:t})}const dM=[{value:"QAR 2.4B+",label:"Total debt capital deployed",accent:!0},{value:"14",label:"Active financing arrangements"},{value:"AAA",label:"Internal risk rating framework"},{value:"8–12%",label:"Target risk-adjusted return range"}];function fM(){return T.jsxs("section",{className:"alrazah-section",style:{background:"#F5F0EB"},children:[T.jsx("div",{className:"alrazah-container",children:T.jsxs("div",{className:"overview-grid",style:{display:"grid",gap:48},children:[T.jsxs(At,{children:[T.jsx("div",{className:"alrazah-caption-label",style:{color:"#8D0034",marginBottom:16},children:"Overview"}),T.jsx("h2",{className:"display-lg",style:{color:"#1A1A1A",maxWidth:540,marginBottom:32},children:"A disciplined approach to capital structure and strategic financing"}),T.jsx("p",{className:"body-lg",style:{color:"#4A4A4A",maxWidth:540,marginBottom:24},children:"Alrazah Holding's debt capital activities are integral to our broader investment mandate. As a publicly listed Qatari shareholding company, we deploy debt instruments strategically to optimise our capital structure, fund high-conviction investments, and generate sustainable returns for our shareholders. Our approach is governed by rigorous risk management frameworks and aligned with Qatar's financial sector development objectives under the Qatar National Vision 2030."}),T.jsx("p",{className:"body-base",style:{color:"#4A4A4A",maxWidth:540},children:"We operate at the intersection of corporate finance and national economic development. Our debt capital strategy supports the growth of Qatar's non-hydrocarbon sectors — real estate, logistics, industrial infrastructure, and energy — while maintaining the capital discipline expected of a publicly listed institution. Every financing decision is evaluated against strict criteria: strategic alignment, risk-adjusted return potential, governance standards, and long-term contribution to shareholder value."})]}),T.jsx(At,{delay:.1,children:T.jsxs("div",{style:{display:"flex",gap:32},children:[T.jsx("div",{style:{width:2,height:80,background:"#8D0034",flexShrink:0}}),T.jsx("div",{style:{flex:1},children:dM.map((t,e)=>T.jsxs("div",{style:{padding:"32px 0",borderTop:e===0?"none":"1px solid #E0DDD8"},children:[T.jsx("div",{className:"stat",style:{color:t.accent?"#8D0034":"#1A1A1A",marginBottom:8},children:t.value}),T.jsx("div",{className:"body-sm",style:{color:"#6B6B6B"},children:t.label})]},t.label))})]})})]})}),T.jsx("style",{children:` @media (min-width: 1024px) { .overview-grid { grid-template-columns: 55fr 45fr !important; gap: 80px !important; } } @media (max-width: 767px) { .overview-grid .stat { font-size: 32px !important; } } `})]})}const hM=[{n:"01",title:"Strategic Alignment",body:"Every debt instrument we issue or acquire must demonstrably advance Alrazah's strategic objectives. We do not transact for short-term yield alone. Financing decisions are evaluated against their contribution to portfolio diversification, sectoral development priorities, and long-term shareholder value. Our capital deployment directly supports Qatar's economic diversification agenda, with particular emphasis on real estate, logistics infrastructure, and industrial capacity."},{n:"02",title:"Risk-Adjusted Returns",body:"We target risk-adjusted returns in the 8–12% range across our debt capital portfolio. This target reflects our institutional risk appetite and the premium required for capital deployment in Qatar's developing debt markets. Our underwriting process incorporates macroeconomic stress testing, counterparty credit analysis, collateral valuation, and scenario modelling. We maintain conservative loan-to-value ratios and require meaningful structural protections in all transactions."},{n:"03",title:"Governance & Transparency",body:"As a publicly listed entity on the Qatar Stock Exchange, Alrazah adheres to the highest standards of corporate governance and financial transparency. Our debt capital activities are subject to oversight by the Board of Directors, the Audit and Risk Committee, and external regulators including the Qatar Central Bank. All material financing arrangements are disclosed in accordance with QSE listing rules and International Financial Reporting Standards (IFRS)."},{n:"04",title:"Operational Integration",body:"Debt capital is not a standalone activity at Alrazah — it is deeply integrated with our real estate development, logistics operations, and asset management functions. Our in-house project management and engineering capabilities enable us to evaluate collateral and underlying assets with institutional precision. This operational integration provides us with information advantages and de-risks our financing activities through direct asset knowledge."}];function pM(){return T.jsxs("section",{className:"alrazah-section",style:{background:"#FFFFFF"},children:[T.jsxs("div",{className:"alrazah-container",style:{maxWidth:1280},children:[T.jsx("div",{style:{maxWidth:920,margin:"0 auto",textAlign:"center"},children:T.jsxs(At,{children:[T.jsx("div",{className:"alrazah-caption-label",style:{color:"#8D0034",marginBottom:16},children:"Our Principles"}),T.jsx("h2",{className:"display-lg",style:{color:"#1A1A1A",marginBottom:24},children:"Capital discipline, strategic alignment, and long-term value creation"}),T.jsx("p",{className:"body-lg",style:{color:"#4A4A4A",maxWidth:720,margin:"0 auto 64px"},children:"Our debt capital philosophy is built on four foundational principles that guide every financing decision across the Alrazah portfolio. These principles reflect our institutional commitment to prudent capital management and our responsibility to shareholders, regulators, and the Qatari economy."})]})}),T.jsx("div",{className:"pillars-grid",style:{display:"grid",gap:40},children:hM.map((t,e)=>T.jsxs(At,{delay:e%2*.1,children:[T.jsx("div",{className:"heading-lg",style:{color:"#8D0034",marginBottom:16},children:t.n}),T.jsx("div",{className:"heading-md",style:{color:"#1A1A1A",marginBottom:12},children:t.title}),T.jsx("p",{className:"body-base",style:{color:"#4A4A4A"},children:t.body})]},t.n))})]}),T.jsx("style",{children:` @media (min-width: 768px) { .pillars-grid { grid-template-columns: 1fr 1fr !important; gap: 40px 40px !important; } } @media (min-width: 1280px) { .pillars-grid { row-gap: 48px !important; } } `})]})}const mM=[{Icon:XT,title:"Corporate Debt Issuance",body:"Issuance of conventional bonds, sukuk, and medium-term note programmes to fund strategic acquisitions and development projects. Our issuance strategy prioritises tenor diversification, investor base broadening, and competitive pricing in both local and international markets."},{Icon:zT,title:"Structured Financing",body:"Bespoke financing solutions including project finance, asset-backed securities, and structured notes. We design capital structures that align repayment profiles with underlying asset cash flows, minimising refinancing risk and optimising cost of capital."},{Icon:qT,title:"Portfolio Company Lending",body:"Intra-group and affiliate lending to support the growth of Alrazah's subsidiary and associate companies. These facilities are structured with market-based pricing, clear covenant packages, and regular performance monitoring to ensure capital efficiency across the group."},{Icon:e_,title:"Debt Portfolio Management",body:"Active management of our debt investment portfolio, including secondary market trading, portfolio rebalancing, and duration management. We monitor credit spreads, interest rate sensitivity, and liquidity profiles to optimise portfolio performance within our risk framework."},{Icon:QT,title:"Syndicated & Club Lending",body:"Participation in syndicated loan facilities and club lending arrangements alongside regional and international financial institutions. Our relationships with leading Qatari and global banks enable us to access scale financing for large-scale infrastructure and development projects."},{Icon:JT,title:"Islamic Finance Solutions",body:"Sharia-compliant financing structures including ijara, murabaha, mudaraba, and sukuk issuances. Our Islamic finance capabilities serve both conventional and faith-based investors, reflecting Qatar's position as a leading centre for Islamic financial services."}];function gM(){return T.jsxs("section",{className:"alrazah-section",style:{background:"#1A1A1A"},children:[T.jsxs("div",{className:"alrazah-container",children:[T.jsxs(At,{children:[T.jsx("div",{className:"alrazah-caption-label",style:{color:"#8D0034",marginBottom:16},children:"What We Do"}),T.jsx("h2",{className:"display-lg",style:{color:"#fff",maxWidth:720,marginBottom:24},children:"Comprehensive debt capital capabilities across the financing spectrum"}),T.jsx("p",{className:"body-lg",style:{color:"rgba(255,255,255,0.72)",maxWidth:720,marginBottom:64},children:"Alrazah Holding operates across the full debt capital value chain — from origination and structuring to active portfolio management. Our capabilities are designed to serve both our internal capital requirements and the financing needs of our portfolio companies and strategic partners."})]}),T.jsx("div",{className:"caps-grid",style:{display:"grid",gap:24},children:mM.map((t,e)=>T.jsx(At,{delay:e%3*.1,children:T.jsxs("article",{style:{background:"#222222",border:"1px solid #333333",padding:40,borderRadius:0},children:[T.jsx(t.Icon,{size:24,strokeWidth:1.5,color:"#8D0034"}),T.jsx("h3",{className:"heading-md",style:{color:"#fff",marginTop:24,marginBottom:12},children:t.title}),T.jsx("p",{className:"body-sm",style:{color:"rgba(255,255,255,0.72)"},children:t.body})]})},t.title))})]}),T.jsx("style",{children:` @media (min-width: 768px) { .caps-grid { grid-template-columns: 1fr 1fr !important; } } @media (min-width: 1024px) { .caps-grid { grid-template-columns: 1fr 1fr 1fr !important; } } `})]})}const yM=[{value:"QAR 2.4B+",label:"Total capital deployed"},{value:"12.3%",label:"Weighted average yield"},{value:"4.2 years",label:"Average tenor"},{value:"0%",label:"Default rate"}],vM=[{title:"Logistics Infrastructure Financing",body:"Structured a QAR 380 million project finance facility to support the development of a 120,000 sqm logistics complex in Doha's industrial zone. The facility features a 7-year tenor, asset-backed security structure, and covenant package tied to lease-up milestones. The project achieved full occupancy within 18 months of completion, exceeding underwriting assumptions.",footL:"QAR 380M",footR:"7-year tenor"},{title:"Sukuk Issuance Programme",body:"Established a QAR 500 million domestic sukuk programme to diversify Alrazah's funding base and support working capital requirements across the real estate and trading divisions. The issuance was oversubscribed by 1.4x, attracting participation from Qatari banks, institutional investors, and regional asset managers. The sukuk is listed on the Qatar Stock Exchange.",footL:"QAR 500M",footR:"Oversubscribed 1.4x"}];function wM(){return T.jsxs("section",{className:"alrazah-section",style:{background:"#F0EEEB"},children:[T.jsxs("div",{className:"alrazah-container",children:[T.jsxs(At,{children:[T.jsx("div",{className:"alrazah-caption-label",style:{color:"#8D0034",marginBottom:16},children:"Track Record"}),T.jsx("h2",{className:"display-lg",style:{color:"#1A1A1A",maxWidth:640,marginBottom:24},children:"Evidence of disciplined execution and sustainable returns"}),T.jsx("p",{className:"body-lg",style:{color:"#4A4A4A",maxWidth:640,marginBottom:64},children:"Our debt capital portfolio reflects a consistent track record of prudent underwriting, active management, and value creation. The following metrics and case studies illustrate our execution capability across market cycles."})]}),T.jsx(At,{children:T.jsx("div",{className:"metrics-bar",style:{background:"#fff",border:"1px solid #E0DDD8",padding:40,display:"grid",gap:32},children:yM.map(t=>T.jsxs("div",{children:[T.jsx("div",{className:"stat",style:{color:"#8D0034",marginBottom:8},children:t.value}),T.jsx("div",{className:"body-sm",style:{color:"#6B6B6B"},children:t.label})]},t.label))})}),T.jsx("div",{className:"cases-grid",style:{display:"grid",gap:24,marginTop:48},children:vM.map((t,e)=>T.jsx(At,{delay:e%2*.1,children:T.jsxs("article",{style:{background:"#fff",border:"1px solid #E0DDD8",padding:40,borderRadius:0,height:"100%",display:"flex",flexDirection:"column"},children:[T.jsx("div",{className:"caption",style:{color:"#8D0034",textTransform:"uppercase",marginBottom:12},children:"Case Study"}),T.jsx("h3",{className:"heading-md",style:{color:"#1A1A1A",marginBottom:16},children:t.title}),T.jsx("p",{className:"body-sm",style:{color:"#4A4A4A"},children:t.body}),T.jsxs("div",{style:{borderTop:"1px solid #E0DDD8",paddingTop:20,marginTop:24,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[T.jsx("span",{className:"heading-sm",style:{color:"#8D0034"},children:t.footL}),T.jsx("span",{className:"body-sm",style:{color:"#6B6B6B"},children:t.footR})]})]})},t.title))})]}),T.jsx("style",{children:` @media (min-width: 768px) { .metrics-bar { grid-template-columns: 1fr 1fr 1fr 1fr !important; justify-content: space-between; } .cases-grid { grid-template-columns: 1fr 1fr !important; } } `})]})}const xM=[{title:"Board Oversight",body:"The Board of Directors maintains ultimate oversight of Alrazah's debt capital strategy through quarterly reviews of the treasury policy, financing limits, and major transaction approvals. All debt issuances exceeding QAR 100 million require Board resolution. The Audit and Risk Committee reviews portfolio performance, covenant compliance, and counterparty exposure on a bi-monthly basis."},{title:"Risk Management Framework",body:"Our risk management framework covers credit risk, market risk (interest rate and foreign exchange), liquidity risk, and operational risk. We employ Value-at-Risk (VaR) modelling for market risk, internal credit ratings for counterparty assessment, and stress testing for liquidity risk. Risk limits are approved annually by the Board and monitored in real-time through our treasury management system."},{title:"Regulatory Compliance",body:"Alrazah complies with all applicable regulations issued by the Qatar Central Bank (QCB), the Qatar Financial Markets Authority (QFMA), and the Qatar Stock Exchange (QSE). Our debt capital disclosures adhere to IFRS 9 (Financial Instruments), IFRS 7 (Financial Instruments Disclosures), and QSE listing rule requirements. We maintain open dialogue with regulators and participate in industry consultations on debt market development."},{title:"Internal Controls",body:"Our internal control environment includes segregation of duties between origination, credit analysis, and portfolio management functions. All financing transactions require dual approval and are subject to post-transaction review by internal audit. We engage external auditors (Big Four) for annual verification of our debt portfolio valuations and compliance with accounting standards."},{title:"ESG Integration",body:"Environmental, social, and governance factors are integrated into our debt capital decision-making process. We evaluate the ESG profile of underlying assets and counterparties, with heightened scrutiny for projects in carbon-intensive sectors. Alrazah is committed to supporting Qatar's sustainable finance agenda, including green bond and ESG sukuk frameworks advanced by the QCB."}];function SM(){return T.jsxs("section",{className:"alrazah-section",style:{background:"#E8E4DE"},children:[T.jsx("div",{className:"alrazah-container",children:T.jsxs("div",{className:"gov-grid",style:{display:"grid",gap:48},children:[T.jsx("div",{className:"gov-left",children:T.jsxs(At,{children:[T.jsx("div",{className:"alrazah-caption-label",style:{color:"#8D0034",marginBottom:16},children:"Governance"}),T.jsx("h2",{className:"display-lg",style:{color:"#1A1A1A",maxWidth:360,marginBottom:24},children:"Institutional rigour in every decision"}),T.jsx("p",{className:"body-base",style:{color:"#4A4A4A",maxWidth:360},children:"Alrazah's debt capital activities operate within a comprehensive governance and risk management framework designed to protect shareholder interests, ensure regulatory compliance, and maintain the confidence of capital markets."})]})}),T.jsx("div",{children:xM.map((t,e)=>T.jsx(At,{delay:e*.05,children:T.jsxs("div",{style:{borderBottom:"1px solid #D5D0CA",padding:"32px 0"},children:[T.jsx("h3",{className:"heading-md",style:{color:"#1A1A1A",marginBottom:12},children:t.title}),T.jsx("p",{className:"body-sm",style:{color:"#4A4A4A"},children:t.body})]})},t.title))})]})}),T.jsx("style",{children:` @media (min-width: 1024px) { .gov-grid { grid-template-columns: 40fr 60fr !important; gap: 80px !important; align-items: start; } .gov-left { position: sticky; top: 120px; } } `})]})}const bM=[{title:"Regulatory Landscape",body:"The Qatar Central Bank has advanced a comprehensive regulatory framework for debt capital markets, including guidelines for corporate bond issuance, sukuk frameworks, and sustainable finance standards. The QCB's ESG and sustainability strategy for the financial sector aims to boost sustainable finance and develop ESG sukuk and bonds, creating new opportunities for institutional investors."},{title:"Market Depth",body:"Qatar's debt capital market has seen increasing issuance diversity, including sovereign green bonds, corporate sukuk, and conventional bonds. Major Qatari corporates — including banks, telecoms, and holding companies — have established EMTN programmes and tapped international investor bases. The market offers competitive pricing, with Qatari issuers achieving some of the tightest spreads among emerging-market corporates."},{title:"Strategic Positioning",body:"Alrazah's position as a publicly listed Qatari holding company provides us with unique access to both domestic and international capital markets. Our relationships with leading regional and global banks, combined with our strong balance sheet and governance standards, enable us to execute financing transactions at competitive terms while maintaining the flexibility to respond to market opportunities."}];function EM(){return T.jsxs("section",{className:"alrazah-section",style:{background:"#FFFFFF"},children:[T.jsxs("div",{className:"alrazah-container",children:[T.jsxs(At,{children:[T.jsx("div",{className:"alrazah-caption-label",style:{color:"#8D0034",marginBottom:16},children:"Market Context"}),T.jsx("h2",{className:"display-lg",style:{color:"#1A1A1A",maxWidth:640,marginBottom:24},children:"Qatar's debt capital markets: A maturing ecosystem"}),T.jsx("p",{className:"body-lg",style:{color:"#4A4A4A",maxWidth:720,marginBottom:64},children:"Qatar's debt capital markets have evolved significantly over the past decade, driven by regulatory modernisation, sovereign issuance leadership, and growing corporate participation. Alrazah is positioned at the forefront of this evolution, leveraging our institutional capabilities to access diverse funding sources and investment opportunities."})]}),T.jsx("div",{className:"me-grid",style:{display:"grid",gap:24},children:bM.map((t,e)=>T.jsx(At,{delay:e%3*.1,children:T.jsxs("article",{style:{background:"#F5F0EB",padding:40,borderRadius:0,height:"100%"},children:[T.jsx("h3",{className:"heading-md",style:{color:"#1A1A1A",marginBottom:12},children:t.title}),T.jsx("p",{className:"body-sm",style:{color:"#4A4A4A"},children:t.body})]})},t.title))})]}),T.jsx("style",{children:` @media (min-width: 1024px) { .me-grid { grid-template-columns: 1fr 1fr 1fr !important; } } `})]})}const TM=[{label:"Treasury & Capital Markets",email:"treasury@alrazahholding.com.qa",phone:"+974 4XXX XXXX"},{label:"Investor Relations",email:"ir@alrazahholding.com.qa",phone:"+974 4XXX XXXX"},{label:"General Enquiries",email:"info@alrazahholding.com.qa",phone:"+974 4XXX XXXX"}];function _M(){return T.jsxs("section",{className:"alrazah-section",style:{background:"#8D0034"},children:[T.jsx("div",{className:"alrazah-container",children:T.jsxs("div",{className:"contact-grid",style:{display:"grid",gap:48},children:[T.jsxs(At,{children:[T.jsx("div",{className:"alrazah-caption-label",style:{color:"rgba(255,255,255,0.6)",marginBottom:16},children:"Engage With Us"}),T.jsx("h2",{className:"display-lg",style:{color:"#fff",maxWidth:560,marginBottom:24},children:"Let's discuss how Alrazah can support your financing objectives"}),T.jsx("p",{className:"body-lg",style:{color:"rgba(255,255,255,0.85)",maxWidth:520,marginBottom:40},children:"Whether you are seeking strategic financing for a development project, exploring co-investment opportunities, or interested in our sukuk and debt issuance programmes, our team is available to discuss how Alrazah's debt capital capabilities can meet your requirements."}),T.jsx("a",{href:"mailto:treasury@alrazahholding.com.qa",className:"cta-btn",style:{display:"inline-block",background:"#fff",color:"#8D0034",padding:"16px 32px",fontWeight:500,fontSize:14,borderRadius:0,textDecoration:"none",transition:"background 200ms ease"},onMouseEnter:t=>t.currentTarget.style.background="#F5F0EB",onMouseLeave:t=>t.currentTarget.style.background="#fff",children:"Contact Our Treasury Team"})]}),T.jsx(At,{delay:.1,children:T.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[TM.map(t=>T.jsxs("div",{style:{borderBottom:"1px solid rgba(255,255,255,0.2)",padding:"24px 0"},children:[T.jsx("div",{className:"caption",style:{color:"rgba(255,255,255,0.6)",textTransform:"uppercase",marginBottom:8},children:t.label}),T.jsx("a",{href:`mailto:${t.email}`,className:"body-base",style:{color:"#fff",textDecoration:"none",display:"block",marginBottom:4},children:t.email}),T.jsx("div",{className:"body-sm",style:{color:"rgba(255,255,255,0.72)"},children:t.phone})]},t.label)),T.jsxs("div",{style:{padding:"24px 0"},children:[T.jsx("div",{className:"caption",style:{color:"rgba(255,255,255,0.6)",textTransform:"uppercase",marginBottom:8},children:"Registered Office"}),T.jsxs("div",{className:"body-sm",style:{color:"rgba(255,255,255,0.72)",whiteSpace:"pre-line"},children:["Alrazah Holding Q.P.S.C.",` `,"P.O. Box XXXXX",` `,"Doha, State of Qatar"]})]})]})})]})}),T.jsx("style",{children:` @media (min-width: 1024px) { .contact-grid { grid-template-columns: 60fr 40fr !important; gap: 80px !important; } } @media (max-width: 767px) { .cta-btn { display: block !important; width: 100% !important; text-align: center; } } `})]})}function CM(){return T.jsxs("main",{children:[T.jsx(_O,{}),T.jsx(cM,{}),T.jsx(fM,{}),T.jsx(pM,{}),T.jsx(gM,{}),T.jsx(wM,{}),T.jsx(SM,{}),T.jsx(EM,{}),T.jsx(_M,{}),T.jsx(PO,{})]})}const kM=()=>{const{isLoadingAuth:t,isLoadingPublicSettings:e,authError:n,navigateToLogin:s}=SO();if(e||t)return T.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:T.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(n){if(n.type==="user_not_registered")return T.jsx(bO,{});if(n.type==="auth_required")return s(),null}return T.jsxs(wk,{children:[T.jsx(lf,{path:"/our-businesses/debt-capital",element:T.jsx(CM,{})}),T.jsx(lf,{path:"*",element:T.jsx(wO,{})})]})};function RM(){return T.jsx(xO,{children:T.jsxs(xC,{client:DC,children:[T.jsxs(bk,{children:[T.jsx(TO,{}),T.jsx(kM,{})]}),T.jsx(Q_,{})]})})}NE.createRoot(document.getElementById("root")).render(T.jsx(RM,{}));